Copy link to clipboard
Copied
Hi
I recieve an error when I open the pdf generated in CF using the following code...
<cfcontent type="application/pdf">
<cfheader name="Content-Disposition" value="filename=test.pdf">
123
The error i recieve in Acrobat Reader reads as follows:
"Adobe Reader could not open test.pdf because it is either not a supported file type or because the file has been damaged (for example it was sent as an email attachment and it wasnt correctly decoded).
Please can someone explain why i keep getting this error.It works perfectly when i create dynamic XLS documents.
Thanks
Regards
Delon
My guess is your problem is due to the fact that your content (123) is not a valid postscript document, which is the format that PDF documents are written in.
Copy link to clipboard
Copied
My guess is your problem is due to the fact that your content (123) is not a valid postscript document, which is the format that PDF documents are written in.
Copy link to clipboard
Copied
We had many problems with this under CF8... We finally decided that PDF's hate form elements, so we removed them and rendered them to LOOK like form elements instead of actually being form elements... That worked for us...
In your test PDF, remove EVERYTHING except plain text and then see if it still fails...
If not then add things back in until it does... This method, I virtually guarantee, will identify the issue for you, even if it is slow and tedious.
D.