Copy link to clipboard
Copied
Hi,
I ran into a problem attempting to save a Word doc as a PDF.
Here's the details:
// get the doc content into a cf var
<cffile action="read" file="xyz.doc" variable="mydoc"/>
// use cfdocument to save the var as a pdf doc
<cfdocument filename="myPDF.pdf" format="pdf" mimeType="application/msword">
<cfoutput>#mydoc#</cfoutput>
</cfdocument>
The generated pdf file looks minimized and crammed, some of its
content is sort of legible, the original Word doc (2000) is of 45k. What's happening?
Is there another way to do it?
Thanks in advance.
Copy link to clipboard
Copied
I am surprised anything is legible.
On CF8 and earlier, cfdocument can convert html/cfml code to pdf. It cannot convert binary Office documents.
CF9 is capable of converting supported Office documents with the help of the "srcfile" attribute and OpenOffice
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WS692D73AF-6338-495d-9E47-C2ECD8BF9307.html
Message was edited by: -==cfSearching==-
Copy link to clipboard
Copied
Very informative. Thank you.