Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFCONTENT pdf error

Explorer ,
Feb 24, 2010 Feb 24, 2010

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

796
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Feb 26, 2010 Feb 26, 2010

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.

Translate
Advocate ,
Feb 26, 2010 Feb 26, 2010

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 26, 2010 Feb 26, 2010
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources