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

Saving/exporting a Word (2000) doc as a PDF

Explorer ,
Aug 05, 2010 Aug 05, 2010

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.

TOPICS
Advanced techniques
947
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
Valorous Hero ,
Aug 05, 2010 Aug 05, 2010

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==-

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
Explorer ,
Aug 06, 2010 Aug 06, 2010
LATEST

Very informative.  Thank you.

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