In Sites Explorer or Activity Stream, users can view various types of documents, such as MS Word, directly in web browser without downloading documents to their client machine as well as install such softwares, like MS Office. To offer this document preview feature, eXo Platform uses the JODConverter service that requires OpenOffice or LibreOffice to be installed locally (in the same machine with the eXo Platform server).
Installing OpenOffice/LibreOffice
Those softwares might be installed already in some Linux distributions by the OS itself. Otherwise, in Windows, follow OpenOffice guideline or LibreOffice guideline to install them.
JODConverter recommends you install the latest version of Office. For other requirements, check out at JODConverter's wiki.
Sigar Framework
In Windows, Sigar Framework is needed.
JODConverter uses Sigar - if it is available - to manage Office processes.
Without Sigar, there is possibility that Office processes are not stopped successfully when
you shut down eXo Platform, and it causes problem in your next start.
So download the following files and install them to
the lib folder ($PLATFORM_TOMCAT_HOME/lib
in Tomcat or $PLATFORM_JBOSS_HOME/standalone/deployments/platform.ear/lib
in JBoss):
sigar.jar
sigar-x86-winnt.dll
for Windows 32.
sigar-amd64-winnt.dll
for Windows 64.
JODConverter version
eXo Platform uses JODConverter v3.0 that enhances processing different file types much.
Activating and deactivating
In eXo Platform, this service can be manually enabled/disabled by setting value of the
wcm.jodconverter.enable parameter in the $PLATFORM_TOMCAT_HOME/gatein/conf/configuration.properties
file (in Tomcat) or $PLATFORM_JBOSS_HOME/standalone/configuration/gatein/configuration.properties
(in JBoss).
If "true", the JODConverter service is activated. It is the default value when this parameter is missing.
If "false", JODConverter service is deactivated.
This can be done also via the customized script.
Configurations
In most cases, you do not need to configure JODConverter because it can work with default configurations. However, if you are using OpenOffice 4 (or later), or have installed the Office server untypically, you will need to specify jodconverter.officehome by yourself. See Specifying jodconverter.officehome.
The followings are all configurations of JODConverter:
Port: 2002 (running one OpenOffice instance with the socket connection in the port number "2002")
Linux
"/opt/openoffice.org3" "/opt/libreoffice" "/usr/lib/openoffice" "/usr/lib/libreoffice"
Windows
"<SYSTEM_PROGRAMFILES>/OpenOffice.org 3" "<SYSTEM_PROGRAMFILES>/LibreOffice 3"
Max Tasks Per Process: 200
Task Queue Timeout: 30000 (30 seconds)
Task Execution Timeout: 120000 (2 minutes)
Retry Timeout: 120000 (2 minutes)
Those configurations are set in the $PLATFORM_TOMCAT_HOME/gatein/conf/configuration.properties
file (in Tomcat) or $PLATFORM_JBOSS_HOME/standalone/configuration/gatein/configuration.properties
(in JBoss), as extracted below:
# JOD Converter wcm.jodconverter.enable=${jodconverter.enable:true} wcm.jodconverter.portnumbers=${jodconverter.portnumbers:2002} wcm.jodconverter.officehome=${jodconverter.officehome:} wcm.jodconverter.taskqueuetimeout=30000 wcm.jodconverter.taskexecutiontimeout=120000 wcm.jodconverter.maxtasksperprocess=200 wcm.jodconverter.retrytimeout=120000
Key | Default value | Description |
---|---|---|
wcm.jodconverter.portnumbers | 2002 | List of ports, separated by commas, those used by each JODConverter processing thread. The number of office instances is equal to the number of ports. |
wcm.jodconverter.officehome | See here | The absolute path to Office Home on the current local device. It means that Office needs to be installed in the local device before using it. |
wcm.jodconverter.taskqueuetimeout | 30000 | The maximum living time of a task in the conversation queue. The task will be removed from the queue if the waiting time is longer than taskQueueTimeout. |
wcm.jodconverter.taskexecutiontimeout | 120000 | The maximum time to process a task. If the processing time of a task is longer than taskExecutionTimeout, this task will be aborted and the next task is processed. |
wcm.jodconverter.maxtasksperprocess | 200 | The maximum number of tasks are processed. |
wcm.jodconverter.retrytimeout | 120000 | The interval time to restart the Office services after an unexpected crash. |
Specifying jodconverter.officehome
Again, all JODConverter configurations can be edited directly in the configuration.properties
file.
However, because the Office Home is the configuration you need to take care most of time, here are detailed instructions for it.
eXo Platform uses the system properties: EXO_JODCONVERTER_OFFICEHOME for this. So you can set it globally:
On Linux, assume that Open Office is installed at /opt/openoffice4
:
export EXO_JODCONVERTER_OFFICEHOME="/opt/openoffice4"
On Windows, assume that Open Office is installed at c:\programfilesx86\openoffice4
:
set EXO_JODCONVERTER_OFFICEHOME=c:\programfilesx86\openoffice4
Alternatively, if you want to set it via customized script, find and edit the following section:
# ----------------------------------------------------------------------------- # JOD Converter configuration # ----------------------------------------------------------------------------- # Used to preview documents # # Requires to have openoffice/libreoffice server installed # Jod Converter activation (Default : true) #EXO_JODCONVERTER_ENABLE=false # Comma separated list of ports numbers to use for open office servers used to convert documents. # One office server instance will be created for each port. (Default : 2002) #EXO_JODCONVERTER_PORTS="2002,2003,2004,2005" # The absolute path to the office home on the server. (Default : Path automatically discovered based on the OS default locations) #EXO_JODCONVERTER_OFFICEHOME="/usr/lib/libreoffice"
Services details
To support as many as possible document types, it is recommended you install all available services of Open Office. However, if you do not want to do so, refer to the following table to know which packages are needed for which services.
File extensions | Service names | Open Office installation package | Libre Office installation package |
---|---|---|---|
| writer | openoffice.org-writer | libreoffice-writer |
| math | openoffice.org-math | libreoffice-math |
odg
| draw | openoffice.org-draw | libreoffice-draw |
| impress | openoffice.org-impress | libreoffice-impress |
| calc | openoffice.org-calc | libreoffice-calc |
See also