May 26, 2017 Webby

Starting OpenOffice.org as a service

JODConverter needs to connect to a running OpenOffice.org instance in order to perform the document conversions.

This is different from starting the OpenOffice.org program as you would normally do. OpenOffice.org can be configured to run as a service and listen for commands on a TCP port; there are a few ways to accomplish this but the simplest one is to start it from the command line with the following options:

  soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard

See the Uno/FAQ on the OpenOffice.org Wiki for more on this topic.

The OpenOffice.org service must be running for JODConverter to work at all. You can think of the OpenOffice.org service as something similar to a database server here: many applications require a database; if the database server is not running the application will not work. JODConverter needs to connect to an OpenOffice.org service; if it is not running… you get the idea. Unless otherwise configured, JODConverter assumes that Openoffice.org is running on port 8100.

Using an OpenOffice.org Service on a different machine

Although it is possible to run and connect to an OpenOffice.org on a different machine, this approach is now discouraged by the author of JODConverter because it leads to various problems. See the above-mentioned OpenOffice.org Wiki page if you insist in adopting this solution.

The suggested approach instead is to run JODConverter as a web service on the same machine where OpenOffice.org is installed, and then use the web service from other machines as required.