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

PDFDocException after optimization in CF10

Explorer ,
Sep 09, 2013 Sep 09, 2013

Copy link to clipboard

Copied

I have a page that first generates a PDF using cfdocument:

<cfdocument name="doc1" format="PDF" marginbottom="1"  >

After this, I am merging this with other PDF files:

<cfpdf action="merge" name="outputpdf">

     <cfpdfparam source="doc1">

     <cfpdfparam  source="#absolutemaindir#\patdocs\#fname#">

</cfpdf>

I am then optimizing the result:

<cfpdf action="optimize" source="outputpdf" pages="*" algo="Nearest_Neighbour"

             name="optimized" nobookmarks nothumbnails nometadata nofonts>

Then finally, I am either outputing this to the screen:

<cfcontent type="application/pdf" variable="#tobinary(optimized)#" >

or I am protecting the result:

<cfpdf encrypt="AES_128" action="protect" password="#oldpw#" source="optimized" 

       newuserpassword="#newpw#" permissions="allowprinting">

Randomly, I am getting PDFDocException errors:  Opetation(sic) could not be completed.  Cause: PDFDocException.

These PDF's are being generated for different patients.  Some patients it happens, others it does not.  I have not been able to determine a difference between the patient's information that would be causing this.

If ColdFusion was not creating PDF files with embedded images that were 20 times larger than the sum of the file sizes, then I wouldn't have to optimize and I wouldn't be getting these errors.

Views

717

Translate

Translate

Report

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
Community Beginner ,
Sep 11, 2013 Sep 11, 2013

Copy link to clipboard

Copied

LATEST

I'm not sure about why it's doing what it's doing, but my team found that it was helpful to look at the XML generated when messing about with PDF's to verify it's validity.

See my other post http://forums.adobe.com/message/5670235#5670235

Good luck.

-- Charles

Votes

Translate

Translate

Report

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
Documentation