Daniel emailed me yesterday with the following question:
I was wondering besides the DOC to PDF conversion, what else is OpenOffice used for in CF9? At my office (gov't site), openoffice may not be approved by our gov't agency to use, and I wanted to figure out what we may lose out on if we don't have it installed?
So I figured he was dead on about the DOC to PDF support, but I also assumed PPT support for CFPRESENTATION (remember that tag? anyone?) would also be lost. I pinged Adam Lehman though and he said that the only feature you lose is DOC to PDF conversion.
Hopefully this will be of use to folks deciding if they need OpenOffice on their ColdFusion servers.
Archived Comments
Does OpenOffice just run as a "service" on the server? Or does ColdFusion have to boot it up to perform these conversions.
This is something (Doc to PDF) that I've actually been very interested in looking into because Doc has super precise formatting and being able to populate a Doc template (maybe in like MS XML format) and convert to a PDF would be super powerful... but that's a whole other conversation.
Per the CF 9 docs, for some stuff if OO is there, it will use it. If it's not, it'll use Apache POI for everything except the DOC->PDF conversion.
Link to the documentation (*gasp*):
http://help.adobe.com/en_US...
I only knew this page existed because I went looking for information on what OO gave me for my new web servers in CF 9.
@Milner: Oh wow Milner - perfect! Thank you! The docs really are a goldmine - but sometimes you just don't know what is there.
@Ben: It runs as a program. When I use the feature, it actually pops open OO on my dock. That's the Mac though - might be different on Windows.
Guys, quick side comment. I was doing some testing and kept getting an error saying OO couldn't be found - even though I clearly saw OO getting started by CF.
I tried a virgin Word doc, super simple, and it converted just fine.
So it seems like CF has a slight bug in error handling for Doc->PDF. It seems to always imply the _lack_ of OO, whereas in my case, it was just the inability to convert the doc. (The doc I tried was pretty old I think so maybe it wasn't a supported format.)
Details on bug I just mentioned: http://cfbugs.adobe.com/cfb...
I'm using Microsoft Word for doc/docx to PDF through CF8 because I was very unhappy with the quality of OpenOffice conversion of docx. If there are images in the layout then they often appear in the wrong place and it always changes the position of page breaks.
A government office should be okay with MS Word running on the server from an "approved software" point of view. I've done experiments with 2 and 3 simultaneous conversion requests and it handled it well. I'm not expecting any more than 10 conversions per hour so this is fine for my app. Maybe OO v4 will get docx right. ;-)
Gary, How are you converting Word-to-PDF using CF8? I've searched online and haven't found much information regarding how to do this. Are you converting it to HTML first and then using CFDocument?
James, it's simply doc > pdf without any other steps. I found a brilliant VBScript that does the job nicely. Just cfexecute it with the appropriate command line params.
http://www.suodenjoki.dk/us...
Thanks Ray for posting this, I had a feeling you would get great feedback from your readers...thanks everyone for this info.
I had the same error about oo not installed or setup correctly. My problem was not the document, it was that i had not enough rights on the oo program directory within the sandbox.
Hi ray,
I have a question here, Do client machines need OpenOffice installed when we give them code. i am working on a product where we want to use openoffice but not sure it will solve all our queries if client macine does not have the openoffice installed
Thanks
I'm not quite sure I get your question Misty. As described in the blog post, if your CF server doesn't have OO, you can't do Doc to PDF. That's it. If the code you write for your client needs to do Doc to PDF, and they don't have OO on the server machine, then, you have a problem.
i get it, Thanks Ray, So point is "If client does not have OO installed, they will not be able to perform any conversion"
Another Question:
"I have one site where i want to download the resume in DOC format and make changes offline to the Doc File and upon the save of the Doc file with CTRL+s or witth save button, it should automatically save the changes to the database online and reupload the doc file to the same place from where it was uploaded and replace the old one".
Is this possible. Just want to know because i am trying something like this, so thought should take some advice from CF GURU
Just a Note
Last 3 rd line, it is not uploaded, it is downloaded
No, it is not possible. The remote server can't know when you save a file on your file system.
Hi,
According to this: http://help.adobe.com/en_US..., it is optional to install OpenOffice for ppt -> html conversions. I thought that was a problem of mine because I keep on getting an error whenever I try to convert ppt to html. It says that: Could not initialize class com.sun.star.lib.loader.WinRegKey
Would you know how to fix this? Thanks a lot for your help.
Sorry no - I think I tried it once a few years ago, but I don't have access to a CF9 box anymore. Can you try in CF10? Otherwise you may be just out of luck unless you get tech support to issue you a patch.
I'll also point out that Google Docs has an API, and I believe the API supports uploading a file and getting another version of it.