Extending OpenOffice.org: Turning OpenOffice.org into a document conversion tool
One of the less well-known features of OpenOffice.org is its ability to run as a service. You can put that ability to some clever use. For example, you can turn OpenOffice.og into a conversion engine and use it to convert documents from one format to another via a Web-based interface or a command-line tool. JODConverter can help you to unleash OpenOffice.org's file conversion capabilities.
To be able to use OpenOffice.org as a conversion engine, you have to start it as a service. This means launching it without its GUI and making it listen for incoming connections on a particular port. To do this, launch OpenOffice.org using the following command on Linux:
soffice -headless -accept="socket,port=8100;urp;"
On Windows, use this command:
"C:\Program Files\OpenOffice.org 2.2\program\soffice" -accept="socket,port=8100;urp;"
Since JODConverter is Java-based, you have to make sure that the Java runtime environment version 1.4 or higher is installed on your machine. Download the latest version of the jodconverter-tomcat-x.x.x.zip package and extract it into your home directory. You can then launch the JODConverter using the start.sh script (start.bat on Windows) in the bin directory: