PDF not loading

PDF not loading

Forum member · Aug 26, 2008
Alright I am running into a very unusual problem. The program I made is generating PDFs on a web server and delivering them to clients (reports and other misc information). So far we have not had any problems until now. One client who is using Adobe 8 keeps on getting just a blank page for their PDF. This would normally indicate that there was a problem somewhere in the code, but we cannot recreate it at all. So my question is, is there some sort of setting or anything that is preventing this from loading? Also the client can load up PDFs from our server that are pre-generated and simply need to be downloaded. If you need any other information please let me know. thanks.

Re: PDF not loading

Support · Aug 26, 2008
Hello, This is most probably because of some stray HTML getting outputted along with the PDF stream. Please try adding the following line of code right after the DrawToWeb method of the document and it will likely solve your problem. Visible = false; Thanks, ceTe Software Support Team

Re: PDF not loading

Forum member · Aug 26, 2008
I have already added that to my code before all this. dClaim.DrawToWeb(path & Session("UserName") & ".pdf") Visible = False Response.End() Any other ideas? Thanks!

Re: PDF not loading

Support · Aug 27, 2008
Hello, We will need to take a look at the headers from the page calling the pdf from the machine where you have this problem. I would recommend using ieHTTPHearders tool which allows you to capture all IE headers. Run your example once again and send the headers it returns to our [^a|mailto:support@cete.com|Support Team^]. Also please save the PDF using the Draw method and send it to our support team so that they can look into it. Thanks, ceTe Software Support Team.

Re: PDF not loading

Forum member · Sep 4, 2008
I cannot post the actual PDF the client is trying to generate due to legal issue, if you still need one I can recreate one on our side and submit it. We got into the client computer and retrieved the HTTP header info as requested. This is from the computer that the PDF does not load on... GET /Xpeditor/XpWeb/printClaim.aspx?DocNum%20=0000271892,HCFA&Location=TRANS&Type=GRAPHIC HTTP/1.1 Accept: */* Accept-Language: en-us UA-CPU: x86 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) Host: xp5i.quadax.com Connection: Keep-Alive Cookie: ASP.NET_SessionId=4ggedkf2jupsgjehbfeiauns; xp5imode=xp5i; xp5iauth=U9qR T86t0OZLFNKJeSXzzpiUqSFGXYw; .ASPXAUTH=EF3DC793000BCE69F2EFFD8E45933DB2033654F2 DA3BEDD1EB3CA5E123F7231219072F49DD5D882FD75378B09A12C6F25243B8979B316CB4CCF10 E3CB1ECACE99CA6DFB9480AEF0EA641300454691B08 HTTP/1.1 200 OK Date: Thu, 04 Sep 2008 16:22:51 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Content-Disposition: inline; filename="c:\inetpub\wwwroot\Xpeditor\XPWeb\DEANNAP.pdf" Cache-Control: private Expires: Thu, 04 Sep 2008 16:23:01 GMT Content-Type: application/pdf Content-Length: 47016 And on my local PC (where it works fine) the header info is this: GET /xpweb/printClaim.aspx?DocNum%20=0000059572,HCFA&Location=TRANS&Type=GRAPHIC HTTP/1.1 Accept: */* Accept-Language: en-us UA-CPU: x86 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 1.1.4322) Host: systems23 Connection: Keep-Alive Cookie: ASP.NET_SessionId=danjuwibq453gj45tydx3sbd; xp5eauth=vK7Z5EXweAMU5NRTthfXcDshvN4ysj23; .ASPXAUTH=91C58E7D80B76640331E26F0EED898B14F03D38D36FC522E4A77C93 BA6C7CB97E947A57D60EB53E296BC8F167295B9AD3F99936B792A4EA10444AF56 AA571C468940BCF04F3BA991255A1728845B0DF2 HTTP/1.1 200 OK Server: Microsoft-IIS/5.1 Date: Thu, 04 Sep 2008 17:41:45 GMT X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Content-Disposition: inline; filename="c:\inetpub\wwwroot\XPWEB\QDX_JOHNZ.pdf" Cache-Control: private, must-revalidate Expires: Thu, 04 Sep 2008 17:41:55 GMT Content-Type: application/pdf Content-Length: 47088 The client is use Win XP with Service Pack 3 I don't know if that would cause any problems or not. We also downloaded and tried to generate the PDF using Mozilla FireFox, and it worked as it should. Currently none of the computers where I am have Service Pack 3. Let me knwo if you need any other info! Thanks again!

Re: PDF not loading

Support · Sep 4, 2008
Hello, Can you please have the customer seeing the blank window try running the sample example on our site by clicking the link below? Let us know if they see the PDF document. Are you running the application on SSL? http://www.DynamicPDF.com/Products/DynamicPDF/Examples/Web_CSharp/GeneratorExamples/ContactList.aspx Thanks, ceTe Software Support Team

Re: PDF not loading

Forum member · Sep 11, 2008
The client said that the pdf you mentioned loaded fine. Also, we are using SSL.

Re: PDF not loading

Support · Sep 11, 2008
Hello, Can you please try using the following lines of code instead of the DrawToWeb method and see if it solves your problem. Response.ContentType = "application/pdf" Response.ExpiresAbsolute = DateTime.Now.AddSeconds(10) Response.AddHeader("Content-Disposition", "inline; inline; filename=""FormFill2.pdf""") MyDocument.Draw(Response.OutputStream) Thanks, ceTe Software Support Team.

Re: PDF not loading

Forum member · Oct 14, 2008
Still haven't heard back from client after trying this. Either it is working now, or they are simply using firefox for printing. Thanks for the help guys!