PDF from database problem
-
Hi all, I have pdf help files in a SQL-DB that has to be displayed in a webpage. The code I wrote currently opens a blank page and only once you refresh the page does the pdf display Anny sugjestions? My code: if (Request.QueryString["ID"] != null) { String ID = Request.QueryString["ID"]; Help.HelpFile objHelpFile = new Help.HelpFile(new Guid(ID)); Response.ClearContent(); Response.ContentType = "application/pdf"; Response.BinaryWrite(objHelpFile.Data); Response.Flush(); Response.End(); }
-
Hi all, I have pdf help files in a SQL-DB that has to be displayed in a webpage. The code I wrote currently opens a blank page and only once you refresh the page does the pdf display Anny sugjestions? My code: if (Request.QueryString["ID"] != null) { String ID = Request.QueryString["ID"]; Help.HelpFile objHelpFile = new Help.HelpFile(new Guid(ID)); Response.ClearContent(); Response.ContentType = "application/pdf"; Response.BinaryWrite(objHelpFile.Data); Response.Flush(); Response.End(); }
-
Hi all, I have pdf help files in a SQL-DB that has to be displayed in a webpage. The code I wrote currently opens a blank page and only once you refresh the page does the pdf display Anny sugjestions? My code: if (Request.QueryString["ID"] != null) { String ID = Request.QueryString["ID"]; Help.HelpFile objHelpFile = new Help.HelpFile(new Guid(ID)); Response.ClearContent(); Response.ContentType = "application/pdf"; Response.BinaryWrite(objHelpFile.Data); Response.Flush(); Response.End(); }
You may also want to use Mozilla Firefox with the Live HTTP Headers[^] to see if there's something missing or malformed in the initial response.
"we must lose precision to make significant statements about complex systems." -deKorvin on uncertainty
-
Hi all, I have pdf help files in a SQL-DB that has to be displayed in a webpage. The code I wrote currently opens a blank page and only once you refresh the page does the pdf display Anny sugjestions? My code: if (Request.QueryString["ID"] != null) { String ID = Request.QueryString["ID"]; Help.HelpFile objHelpFile = new Help.HelpFile(new Guid(ID)); Response.ClearContent(); Response.ContentType = "application/pdf"; Response.BinaryWrite(objHelpFile.Data); Response.Flush(); Response.End(); }
I think i had this a while back - was due to a missing "Content-Transfer-Encoding = binary" header if I remember correctly...