Link to home
Start Free TrialLog in
Avatar of eejones
eejones

asked on

Coldfusion: display TIFF blob as a PDF

I must read a blob (a TIFF image) from an Oracle database and display it in a browser as a PDF. I write the blob to a TIFF file, then use <cfdocument> to display the TIFF image as a PDF. The second step is very slow, and on the largest blobs there is not enough memory:

java.lang.OutOfMemoryError: Java heap space.

Converting TIFF to PDF in ImageMagick from ColdFusion is even slower.

Is there a better way to do this in ColdFusion?

Here is my code:

<cfimage action="write" source="#queryName.theTIFFblob#" destination="newfile.tif" > 
<cfdocument format="pdf" >
    <img src="newfile.tif">
</cfdocument>

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of galadore
galadore
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of eejones
eejones

ASKER

galadore and Jones911:

Thanks to you both. I suspected there was a limitation to the tools but hoped to get that confirmed by experts before considering other methods.

Jones911 I upped the CF ram to 1024mb and still hit the wall.

galadore if I find no other solution I may do the conversion offline, using cfschedule perhaps, and email it to the user.


Avatar of eejones

ASKER

I do not think there is a solution - in the end we are using a different tool than ColdFusion image processing (Java)  -  but the comments were helpful. Thanks for the input to both of you.