A converter for office docs.
Run this script without arguments to get help.
It needs an openoffice server running in background.
Lots of this code was taken from the official OOo documentation for Python programmers.
Do the real conversion.
Convert a file to HTML.
The function calls an OOo.org server in background to complete the task.
The filename and data arguments represent the name of the file to be converted and the contents of the file.
Returned is th path to a temporary directory, where the modified file and any subobjects (images, etc.) might reside.
It is in the resposibility of the calling code to remove the directory!
Convert the document in path to XHTML.
Returns the HTML text. Any subobjects are placed as files in the document path.
This function is not used in the psj packages, because it seems to suffer from race conditions when certain packages (namely Products.LinguaPlone) are used.
Convert the document in path to PDF.
Returns the PDF document as string. Any subobjects are placed as files in the document path.