DrawToWeb send corrupted PDF

DrawToWeb send corrupted PDF

Forum member · Feb 12, 2007
I have a PDF file created by Merger. When I am done merging the files, and call DrawToWeb, this is the output I get in IE %PDF-1.6 %???? 1 0 obj<> endobj 2 0 obj<> endobj 3 0 obj<> endobj 4 0 obj<> endobj 5 0 obj<> endobj 6 0 obj<> endobj 7 0 obj<> endobj 8 0 obj<> endobj 9 0 obj<> endobj 10 0 obj<> endobj 11 0 obj<> endobj 12 0 obj<> endobj 13 0 obj<> endobj 14 0 obj<> endobj 15 0 obj<> endobj 16 0 obj<> endobj 17 0 obj<> endobj 18 0 obj<> endobj 19 0 obj<> endobj 20 0 obj<> endobj 21 0 obj<> Any ideas what is happening? I call Response.Clear before I call DrawToWeb, and Response.End after. I can write the file to disk, via Draw, without any issues. Thanks Marc

Re: DrawToWeb send corrupted PDF

Support · Feb 12, 2007
Hi Marc, The PDF code is getting displayed in the browser in this way because there is likely something in your code that is triggering the Content-Type to be set to text (instead of application/pdf). Are you writing anything to the Response stream before the PDF is being drawn? Try removing any calls to the Response stream before the DrawToWeb is called. You need not set any Response information as all this is done automatically from the DrawToWeb method. Go ahead and leave the Response.End after the DrawToWeb but all other Response calls should be removed. Thanks, ceTe Software Support Team

Re: DrawToWeb send corrupted PDF

Forum member · Feb 13, 2007
I verified that none of my code was writing to the Reponse object explicitly. I still had the same issues. I did a Response.ContentType = "application/pdf" before calling the DrawToWeb, and the document did come down as a PDF, but it started at page 2, lost page 1. Again, the file on disk which is generated by Draw is correct. Could this be related to my other issue of the megred file not being compressed? thanks Marc

Re: DrawToWeb send corrupted PDF

Support · Feb 13, 2007
Hello Marc, The issue does not seem to be related to the merging of uncompressed PDF files. When you say "page 1 is lost", is it the page from a multi page PDF document that you are merging or is it a single page PDF document by itself? Thanks, ceTe Software Support Team

Re: DrawToWeb send corrupted PDF

Forum member · Feb 13, 2007
All the documents are multi-page. I have provided samples via an email, Vishal, has them.