
Document Conversion with OpenOffice
Introduction #
Liferay has built-in support for converting document types using OpenOffice.org backend.
Installing and running #
To enable document conversion in the Document Library portlet, follow the instructions bellow:
1. Install OpenOffice.org v2.0.3 or higher (has been tested on many versions, include 3.2).
2. Go to the folder where it was installed (for example, C:\Program Files\OpenOffice.org\program) and start OpenOffice service with the following command:
soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard
Note : on Linux (Debian) platform the "-" prefix are deprecated and said to be replaced by "--"
Note: It may be advantageous to add this as a cron job to run at start up.
If you are running on Mac OS X, then you should run the following from the Terminal program (note that this is assuming you are running Open Office and it is installed in your /Applications directory):
/Applications/OpenOffice.org.app/Contents/MacOS/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless
3. Go to Admin portlet, then click on the Server tab, then OpenOffice tab. Click on enable, in case OpenOffice is listening to a different port change the it accordingly.
Enable OpenOffice in portal-ext.properties #
To enable OpenOffice-Integration via portal-ext.properties, simply copy the following line in your portal-ext.properties:
openoffice.server.enabled=true
You should also add in this file :
openoffice.server.host=//YourServerURL//
Places where this integration is used #
Document Library portlet
You should see this when you View a document in Document Library, click on the desired conversion.
Wiki and Wiki Display portlets
If you click on General Options, you should see the "Covert To" row:
Supported formats #
From (any of) | To (any of) | |
---|---|---|
Text Formats | ||
OpenDocument Text (.odt) OpenOffice.org 1.0 Text (.sxw) Rich Text Format (.rtf) Microsoft Word (.doc) Microsoft Word 2007 (.docx) (Requires OpenOffice 3.0+) WordPerfect (.wpd) Plain Text (.txt) HTML (.html) | Portable Document Format (.pdf) OpenDocument Text (.odt) OpenOffice.org 1.0 Text (.sxw) Rich Text Format (.rtf) Microsoft Word (.doc) Plain Text (.txt) | |
Spreadsheet Formats | ||
OpenDocument Spreadsheet (.ods) OpenOffice.org 1.0 Spreadsheet (.sxc) Microsoft Excel (.xls) Microsoft Excel 2007 (.xlsx) (Requires OpenOffice 3.0+) Comma-Separated Values (.csv) Tab-Separated Values (.tsv) | Portable Document Format (.pdf) OpenDocument Spreadsheet (.ods) OpenOffice.org 1.0 Spreadsheet (.sxc) Microsoft Excel (.xls) Comma-Separated Values (.csv) Tab-Separated Values (.tsv) | |
Presentation Formats | ||
OpenDocument Presentation (.odp) OpenOffice.org 1.0 Presentation (.sxi) Microsoft PowerPoint (.ppt) Microsoft PowerPoint 2007 (.pptx) (Requires OpenOffice 3.0+) | Portable Document Format (.pdf) Macromedia Flash (.swf) OpenDocument Presentation (.odp) OpenOffice.org 1.0 Presentation (.sxi) Microsoft PowerPoint (.ppt) |
Related links #
JODConverter - library used for this integration
Known Issues #
- On OSX 10.6, if you upgraded your Java to 6 update 22, this breaks OpenOffice.org 3.2.1 and earlier because they cannot find Java. You can find the fix for OO on the OpenOffice wiki