going from this:
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/cfobje28.htm
One could save a file as html and then include it in the pdf.
I've only tried simple docs. (CFMX 7, M$ Word needs to be on
the machine)
<CFTRY>
<!--- If it exists, connect to it --->
<CFOBJECT ACTION="CONNECT" CLASS="Word.Application"
NAME="WordApp"
TYPE="COM">
<CFCATCH>
<!--- The object doesn't exist, so create it --->
<CFOBJECT ACTION="CREATE" CLASS="Word.Application"
NAME="WordApp"
TYPE="COM">
</CFCATCH>
</CFTRY>
<!--- grab the content; add line breaks; few other fixes
--->
<cfscript>
WordApp.Visible = FALSE;
WordDoc = WordApp.Documents;
newDoc =
WordDoc.open('#GetDirectoryFromPath(GetBaseTemplatePath())#test.doc');
//myRange = newDoc.Range(0);
newDoc.saveAs('#GetDirectoryFromPath(GetBaseTemplatePath())#testdoctohtml.html',
Val(8));
//documentContent=myRange.text;
newDoc.Close();
WordApp.Quit();
WordApp = "Nothing";
//documentContent = Replace(documentContent, Chr(13),
"<BR>", "ALL") ;
//documentContent = Replace(documentContent, "�",
"'", "ALL") ;
//documentContent = Replace(documentContent, " � ",
" - ",
"ALL") ;
// apostrophes are interpreted as =; change
//documentContent = Replace(documentContent, "=s", "'s",
"ALL") ;
//documentContent = "<P>" & documentContent &
"</P>" ;
</cfscript>
<cfsavecontent variable="thehtmldoc">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<!--- <cfoutput>#documentContent#</cfoutput>
--->
<!--- <cfdump var="#newDoc#" > --->
<cfinclude template="testdoctohtml.html">
</body>
</html>
</cfsavecontent>
<cfdocument name="report" format="PDF"
filename="testdoctopdf.pdf"
overwrite="yes" fontembed="Yes" pagetype="letter"
encryption="40-bit" permissions="AllowPrinting,AllowCopy"
margintop="0.1"
marginleft="0.1" marginright="0.1">
<cfdocumentsection
><cfoutput>#thehtmldoc#</cfoutput></cfdocumentsection>
</cfdocument>
<cfoutput>#thehtmldoc#</cfoutput>
HTH,
--
Tim Carley
www.recfusion.com
info@NOSPAMINGrecfusion.com