Office Server Properties
Reference
The office server that converts documents for the Office Importer and produces the ODT and RTF exports is configured in xwiki/WEB-INF/xwiki.properties, in the section "Settings for the OpenOffice server instance consumed by the OfficeImporter component". Every property there ships commented out, showing its default value, so a property only takes effect once its line is uncommented. The openoffice. prefix is historical: the same properties configure a LibreOffice installation.
| Property | Default | Description |
|---|---|---|
| openoffice.serverType | 0 | 0 for a server XWiki starts and stops itself, see Connect to an Internal Office Server. 1 for a server you start yourself, see Connect to an External Office Server. Any other value leaves the office server unusable, reporting the state "Invalid Configuration". |
| openoffice.serverPorts | 8100,8101 | The ports used to reach the office server. An internally managed server starts one office process per port; an externally managed one is only reached on the first port of the list. |
| openoffice.autoStart | false | true to have XWiki start, or connect to, the office server when it starts up, instead of leaving that to the "Office Server" administration section. |
| openoffice.homePath | the installation XWiki detects | The directory the office suite is installed in. Set it to the installation directory itself, not to its program subdirectory. Used by an internally managed server only. |
| openoffice.profilePath | the profile the office suite computes | The office user profile directory the server runs with. Used by an internally managed server only. |
| openoffice.maxTasksPerProcess | 50 | The number of conversions one office process handles before it is recycled. Used by an internally managed server only. |
| openoffice.taskExecutionTimeout | 60000 | The time, in milliseconds, a single conversion may take before it is abandoned. Used by an internally managed server only. |
| officeimporter.presentation.imageFormat | jpg | The image format the slides of an imported presentation are converted to. |
| officeimporter.presentation.quality | 95 | The quality of those images, from 0 to 100. It overrides any filter configured for HTML presentations in custom-document-formats.json, and it is ignored when the image format is png. |
| officeimporter.presentation.slideWidth | 1920 | The width, in pixels, of those images. |
When openoffice.homePath is left unset, XWiki reads the XWIKI_OFFICE_HOME environment variable, and falls back to detecting the installation itself.
Typical Office Installation Directories
| Operating system | openoffice.homePath | openoffice.profilePath |
|---|---|---|
| Linux | /usr/lib/libreoffice | /home/{user}/.config/libreoffice/4 |
| Microsoft Windows | C:/Program Files/LibreOffice | C:/Users/{user}/AppData/Roaming/LibreOffice/4 |
| macOS | /Applications/LibreOffice.app/Contents | /Users/{user}/Library/Application Support/LibreOffice/4 |
On Fedora, see the Office Importer installation notes.
FAQ
Do I need to install the Office Importer application in XWiki?
No, the Office Importer application comes pre-bundled, so no manual installation is required.
How does the Office Importer convert a document?
It hands the document to the running office server, which converts it to HTML, and then transforms that HTML into XWiki syntax. This is what lets office files such as DOCX and XLSX be imported and displayed in XWiki.
Why set homePath and profilePath by hand rather than let XWiki work them out?
The computed values are derived from the operating environment and are not accurate on every system, so setting both explicitly avoids an office server that fails to start for no visible reason.
Do these properties take effect without restarting XWiki?
No, xwiki.properties is read when XWiki starts. The "Office Server" administration section can start, stop or reconnect the server, but it cannot change these values.
What is the difference between an internally and an externally managed office server?
Internally managed, openoffice.serverType 0, means XWiki starts and stops the office process itself. Externally managed, openoffice.serverType 1, means you start the process and XWiki only connects to it, which is what you want when its startup parameters or its lifetime have to be yours to control.
More
To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.