Difference between revisions of "Third-party software integration: OpenOffice.org"

From OpenKM Documentation
Jump to: navigation, search
(OpenKM 5.1)
 
(10 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
OpenKM can convert some document types to PDF. This is a great help if need to read an Microsoft Office / OpenOffice.org document and you don't have the software installed in the computer.
 
OpenKM can convert some document types to PDF. This is a great help if need to read an Microsoft Office / OpenOffice.org document and you don't have the software installed in the computer.
  
{{Note|OpenKM has been roughly tested with '''OpenOffice.org 3.2.1''', but we have also configured with '''OpenOffice.org 3.3.2''' and '''LibreOffice 3.3.2''' and seems to work pretty well, but for now we prefer OpenOffice.org 3.2.1 for production environments.}}
+
{{Note|OpenKM has been roughly tested with recent build of '''OpenOffice.org''' and '''LibreOffice''', but in more recent Linux distros the most common used is '''LibreOffice'''.}}
  
 
In a recent Ubuntu or Debian release, you can install it simply as:
 
In a recent Ubuntu or Debian release, you can install it simply as:
 
   $ sudo aptitude install openoffice.org
 
   $ sudo aptitude install openoffice.org
  
Recently has been released OpenOffice.org 3.3.0 and is not fully tested unde OpenKM. You can download the previous stable from [http://archive.services.openoffice.org/pub/openoffice-archive/stable/3.2.1/ OpenOffice Archive Servers].
+
or
 +
  $ sudo aptitude install libreoffice
 +
 
 +
In a recent Redhat/CentOS 6/7 or Fedora release, you can use:
 +
sudo yum install libreoffice libreoffice-headless
 +
 
 +
To configure OpenKM and LibreOffice integration you have several configuration properties, but the most important one is '''system.openoffice.path''' with should be set to the OpenOffice (/usr/lib/openoffice) or LibreOffice (/usr/lib/libreoffice) installation path.
 +
 
 +
Learn more about OpenOffice / LibreOffice configuration parameters at [[OpenKM.cfg#Enable_OpenOffice.org_integration|Enable OpenOffice.org integration]].
  
 
== OpenKM 5.1 ==
 
== OpenKM 5.1 ==
 +
Configuration parameters are the same as OpenKM 5.0, but in this case they should not go into OpenKM.cfg file, but they are stored at database and configured at Administration > Configuration.
 +
 
You can also configure OpenKM to use a remote server for OpenOffice document conversion.
 
You can also configure OpenKM to use a remote server for OpenOffice document conversion.
  
Line 17: Line 27:
 
</source>
 
</source>
  
{{Note|This feature it in development and actually not released for public testing.}}
+
{{Note|This feature is under development and actually not released for public testing.}}
 +
 
 +
{{Advice|If you have problems with OpenOffice / LibreOffice integration, take a look at [[OpenOffice configuration issues]].}}
  
 
== OpenKM 5.0 ==
 
== OpenKM 5.0 ==
Line 28: Line 40:
 
</source>
 
</source>
  
Note that '''system.openoffice.tasks''' and '''system.openoffice.port''' have already a default value and is not needed to be set.
+
In case of LibreOffice and Linux, the '''system.openoffice.path''' property should be set to ''/usr/lib/libreoffice''. Note that '''system.openoffice.tasks''' and '''system.openoffice.port''' have already a default value and is not needed to be set.
  
 
{{Warning|Starting from OpenKM 5.0 you don't need to start OpenOffice.org as a service because OpenKM will take case of this. You only need to set the '''system.openoffice''' configuration property in [[OpenKM.cfg]] to the path of a working OpenOffice.org installation.}}
 
{{Warning|Starting from OpenKM 5.0 you don't need to start OpenOffice.org as a service because OpenKM will take case of this. You only need to set the '''system.openoffice''' configuration property in [[OpenKM.cfg]] to the path of a working OpenOffice.org installation.}}
Line 47: Line 59:
 
system.openoffice.path=C:\\Program Files\\OpenOffice.org 3
 
system.openoffice.path=C:\\Program Files\\OpenOffice.org 3
 
</source>
 
</source>
 +
 +
{{Advice|If you have problems with OpenOffice / LibreOffice integration, take a look at [[OpenOffice configuration issues]].}}
  
 
== OpenKM 4.x and older versions ==
 
== OpenKM 4.x and older versions ==
Line 88: Line 102:
 
# openoffice.org headless server script
 
# openoffice.org headless server script
 
#
 
#
# chkconfig: 2345 80 30 begin_of_the_skype_highlighting              2345 80 30      end_of_the_skype_highlighting begin_of_the_skype_highlighting              2345 80 30      end_of_the_skype_highlighting
+
# chkconfig: 2345 80 30
 
# description: headless openoffice server script
 
# description: headless openoffice server script
 
# processname: openoffice
 
# processname: openoffice
Line 149: Line 163:
 
* http://www.oooforum.org/forum/viewtopic.phtml?t=11890
 
* http://www.oooforum.org/forum/viewtopic.phtml?t=11890
 
* http://code.google.com/p/openmeetings/wiki/OpenOfficeConverter
 
* http://code.google.com/p/openmeetings/wiki/OpenOfficeConverter
 
  
 
== Windows ==
 
== Windows ==
Line 179: Line 192:
 
* http://support.microsoft.com/kb/q137890/
 
* http://support.microsoft.com/kb/q137890/
 
* http://www.iopus.com/guides/srvany.htm
 
* http://www.iopus.com/guides/srvany.htm
 
  
 
[[Category: Installation Guide]]
 
[[Category: Installation Guide]]

Latest revision as of 15:46, 10 December 2015

OpenKM can convert some document types to PDF. This is a great help if need to read an Microsoft Office / OpenOffice.org document and you don't have the software installed in the computer.


Nota clasica.png OpenKM has been roughly tested with recent build of OpenOffice.org and LibreOffice, but in more recent Linux distros the most common used is LibreOffice.

In a recent Ubuntu or Debian release, you can install it simply as:

 $ sudo aptitude install openoffice.org

or

 $ sudo aptitude install libreoffice

In a recent Redhat/CentOS 6/7 or Fedora release, you can use:

sudo yum install libreoffice libreoffice-headless

To configure OpenKM and LibreOffice integration you have several configuration properties, but the most important one is system.openoffice.path with should be set to the OpenOffice (/usr/lib/openoffice) or LibreOffice (/usr/lib/libreoffice) installation path.

Learn more about OpenOffice / LibreOffice configuration parameters at Enable OpenOffice.org integration.

OpenKM 5.1

Configuration parameters are the same as OpenKM 5.0, but in this case they should not go into OpenKM.cfg file, but they are stored at database and configured at Administration > Configuration.

You can also configure OpenKM to use a remote server for OpenOffice document conversion.

system.openoffice.server=http://localhost:8080/converter/convert

Nota clasica.png This feature is under development and actually not released for public testing.


Nota idea.png If you have problems with OpenOffice / LibreOffice integration, take a look at OpenOffice configuration issues.

OpenKM 5.0

In this OpenKM some things changes. You can configure OpenOffice.org listen port and a maximun conversion tasks:

system.openoffice.path=/usr/lib/openoffice
system.openoffice.tasks=5
system.openoffice.port=2222

In case of LibreOffice and Linux, the system.openoffice.path property should be set to /usr/lib/libreoffice. Note that system.openoffice.tasks and system.openoffice.port have already a default value and is not needed to be set.


Nota advertencia.png Starting from OpenKM 5.0 you don't need to start OpenOffice.org as a service because OpenKM will take case of this. You only need to set the system.openoffice configuration property in OpenKM.cfg to the path of a working OpenOffice.org installation.

Linux

system.openoffice.path=/usr/lib/openoffice

Windows

system.openoffice.path=C:/Program Files/OpenOffice.org 3

or

system.openoffice.path=C:\\Program Files\\OpenOffice.org 3

Nota idea.png If you have problems with OpenOffice / LibreOffice integration, take a look at OpenOffice configuration issues.

OpenKM 4.x and older versions

You need an OpenOffice.org installation in the OpenKM server, and also this OpenOffice.org application has to be running in server mode (also known as headless). In Debian / Ubuntu, depending of you OpenOffice.org version you will have to install an X11 virtual server or not:

$ apt-get install xvfb

And start it using this command:

$ xvfb-run /usr/lib/openoffice/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard

From OpenOffice.org 2.3, it is not necessary the X11 virtual server but you should install these packages:

$ aptitude install openoffice.org-headless openoffice.org-java openoffice.org

But before of this, you must enable a couple of repositories:

 deb http://en.archive.ubuntu.com/ubuntu/ hardy-updates universe
 deb http://en.archive.ubuntu.com/ubuntu/ hardy-updates multiverse

This script simplifies the start process (For security reasons, you should no start OpenOffice.org as root):

#!/bin/sh
unset DISPLAY
/usr/lib/openoffice/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo
 -headless -nofirststartwizard

OpenOffice.org will listen at port 8100, so you can check that the application has started running this:

$ netstat -putan | grep 8100

Also you can configure OpenOffice.org as a service with this script:

#!/bin/bash
# openoffice.org headless server script
#
# chkconfig: 2345 80 30
# description: headless openoffice server script
# processname: openoffice
#
# Author: Vic Vijayakumar
# Modified by Paco Avila and Federico Ch. Tomasczik
#
SOFFICE=/usr/bin/soffice
PIDFILE=/var/run/openoffice-server.pid
set -e
case "$1" in
    start)
        if [ -f $PIDFILE ]; then
            echo "OpenOffice headless server has already started."
            sleep 5
            exit
        fi
        echo "Starting OpenOffice headless server"
        $SOFFICE -headless -nologo -nofirststartwizard -accept="socket,host=127.0.0.1,port=8100;urp" & > /dev/null 2>&1
        touch $PIDFILE
        ;;
    stop)
        if [ -f $PIDFILE ]; then
            echo "Stopping OpenOffice headless server."
            killall -9 soffice && killall -9 soffice.bin
            rm -f $PIDFILE
            exit
        fi
        echo "Openoffice headless server is not running."
        exit
        ;;
    *)
        echo "Usage: $0 {start|stop}"
        exit 1
esac
exit 0

Change the permissions to this file:

$ chmod 0755 /etc/init.d/openoffice

Install openoffice init script links:

For Debian based distros like Ubuntu

$ update-rc.d openoffice defaults

For RedHat based distros like CentOS

$ chkconfig --add openoffice

And this script will launch OpenOffice.org on every system reboot. Also you can launch it manually this way:

$ /etc/init.d/openoffice start

More info at:

Windows

Install Windows Server 2003 Resource Kit Tools in your computer for example at c:\tools

Create a openoffice service cd c:\tools

instsrv openoffice c:\tools\srvany.exe

Modify system registry using regedit, got to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\openoffice

Add key Parameters

Into Parameters add mew parameters key Application as REG_SZ ( String value ) with your server soffice.exe path, for example C:\Archivos de programa\OpenOffice.org 3\program\soffice.exe

Into Parameter add new parameters key AppParameters as REG_SZ with value -nofirststartwizard -nologo -headless -accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager

To start service type:

net start openoffice

To ensure service is well installed:

netstat -anp tcp

To delete the service type:

sc delete openoffice

More info at: