I have a simple web page that is trying to convert a TIFF image to a PDF, and then display it in a visitor's browser. For simplicity and testing sake, the TIFF resides in the same folder as the page attempting to display it. I used the example here on the ceTe site to accomplish the task (create a TiffFile object, map the object to the TIFF image, then use the GetDocument function of the TiffFile to read it into a new DynamicPDF document and write it to the browser).
If I browse to the page on the server itself (which is running Windows 2000), the TIFF image opens fine. If I try to browse the page from my workstation (XP Pro), however, I get an error stating that the "file is damaged and could not be repaired." For grins I installed the DynamicPDF on a Windows 2003 server and tried it from there. I don't get the error message above, however all I do get is a blank screen.
Any suggestions would be appreciated. Thanks!
Steve
Error when converting Tiff to PDF
Re: Error when converting Tiff to PDF
Support · Jul 2, 2008Hello Steve,
The error you are getting is most probably because of some stray HTML getting outputted along with the PDF stream. You can stop the stray HTML getting added to the PDF stream by adding the following line of code right after the DrawToWeb method of the document object.
Visible = false;
You can also refer to the Tech Article
for more details.
Thanks,
ceTe Software Support Team.
Re: Error when converting Tiff to PDF
Forum member · Jul 2, 2008The visible=false tagging worked. Thanks for the quick reply!
Steve