Skip to main content
January 29, 2008
Question

cfdocument image scaling issue

  • January 29, 2008
  • 1 reply
  • 1498 views
When using the cfdocument tag to create a pdf file I'm experiencing image scaling issues. I know that this was a problem that was supposedly resolved in the cumulative hotfix3 for CFMX7. I've applied the hotfix twice, but the image scaling issue persists. I've noticed that if you create the same pdf twice in a row, the second (and subsequent) pdf's have the image scaled properly. It seems that once the image is loaded into the cache, it starts to scale properly, but the first time that you attempt to create the pdf, the image is larger than normal and cropped.

I've tried using different image file formats and some other things on my end with no success. Is anyone else having this problem or have any suggestions on how to fix it or create a work around? I'm about out of ideas, and this seems to be a CF problem. Any help would be greatly appreciated.
This topic has been closed for replies.

1 reply

Participant
February 13, 2008
I'm wondering if you found a resolution for your issue. I'm generating PDF files which include jpg images (using the cfdocument tag) and the files are big, like 11+ megs. They compress down to less than 1 meg so I wonder if you are seeing this too.
February 13, 2008
Although the images I'm using are nowhere as large as yours, I was able to resolve the scaling issue. I found a different link for hotfix 3 that has some additional installation instructions. I had applied hotfix 3 before but never copied the 4 new jar files to cfmx7_root/lib. Here's the link that I'm referring to. Pay special attention to steps 3-6.

http://kb.adobe.com/selfservice/viewContent.do?externalId=kb402093&sliceId=1

Participant
February 13, 2008
Sadly that won't help us because we're using CF 8. I wonder if there's a similar set of jar files in CF 8. Maybe someone from Adobe will respond...

I tried simplifying my example to just the CFDocument tags with a single img tag in-between. The jpg file is 192 KB but the PDF ends up being 1,844KB, about 10X the size of the content.

Note that the resultant PDF compresses down to about 159 KB using Acrobat or another optimization utility but it won't work for us to have to manually optimize each pdf before sending...

If you/anyone knows of a function/utility/com/library to do pdf compression/optimization that might a acceptable work-around...