Open a Word doc, Convert to PDF and Display the PDF to the User.
Hello all,
I have read quite a bit on this topic and tested many with no actual solution. What I need to accomplish is to open a MS Word document using CF8 that is saved in a share and then convert to PDF (read only) and display the results to the user.
Does any one know of an actual working solution to this?
Using the code below, I have opened the Word document with out formatting.
cfscript
objWord=CreateObject("COM", "Word.Application");
objDoc = objWord.Documents;
wordDoc = objDoc.Open("test2.doc");
docRange = wordDoc.Range(0);
docText = docRange.Text;
/cfscript
cfdump var="#docText#"
cfscript
wordDoc.Close();
objWord.Quit();
/cfscript
This is unpredictable and is very slow.
The next attempt is,
cfheader name="Content-Disposition" value="inline; filename=temp.doc"
cfcontent type="application/word" file="..\Conv_PDF\NP_2.0.doc" deletefile="no"
This will open the Word doc and display in a r/w mode.
Any ideas or information will be very helpful.
Thank you
TJ
