2.8. JODConverter configuration

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):

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).

This can be done also via the customized script.

Configurations

Note

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:

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
KeyDefault valueDescription
wcm.jodconverter.portnumbers2002List 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.officehomeSee hereThe 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.taskqueuetimeout30000The 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.taskexecutiontimeout120000The 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.maxtasksperprocess200The maximum number of tasks are processed.
wcm.jodconverter.retrytimeout120000The 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:

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 extensionsService namesOpen Office installation packageLibre Office installation package

doc

docx

odt

writeropenoffice.org-writerlibreoffice-writer

odf

mathopenoffice.org-mathlibreoffice-math
odg drawopenoffice.org-drawlibreoffice-draw

odp

ppt

pptx

impressopenoffice.org-impresslibreoffice-impress

ods

ots

xls

xlsx

xlt

calcopenoffice.org-calclibreoffice-calc

See also

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus