Integrations

LibreOffice integration for Microsoft Office previews

LibreOffice integration enables previews for Microsoft Office file types such as docx, pptx, and enables previews for some other types such as OpenOffice/LibreOffice files, HTML and plain text files.

Unoserver support (ResourceSpace 10.4)

Install unoserver as per https://github.com/unoconv/unoserver

You must then add the following line to config.php

$unoconv_path="/usr/local/bin";

Ensure the path is correct - you can type "which unoconvert" to find the path to the executable.

Start Unoserver with:

unoserver &

The $unoconv_extensions configuration option can be used to control which file types are sent to Unoserver for conversion.

On Linux the following willl start the Unoserver listener on startup so no need to worry about starting the listener on reboots.

Create a file /etc/init.d/local

#! /bin/sh
unoserver &

Then:

sudo chmod +x /etc/init.d/local
update-rc.d local defaults 80

Legacy unoconv support (ResourceSpace versions prior to 10.4)

If you require preview files to be created for common office document formats such as .docx and .pptx you will need to install a utility called Unoconv which allows conversion between different document formats in Open Office.

sudo apt-get install unoconv

You must then add the following line to config.php

$unoconv_path="/usr/bin";

Next start the unoconv listener by enter the following into the Command line/Terminal:

unoconv --listener &

It should start its own listener but it is mostly required to run this command in order to ensure that it will work correctly.

The default file extensions that will be previewed with Open office are:

$unoconv_extensions=array("doc","docx","odt","odp","html","rtf","txt","ppt","pptx","sxw","sdw","html","psw","rtf","sdw","pdb","bib","txt","ltx","sdd","sda","odg","sdc");

You can prevent the system from adding the automatic PDF alternative by including the extension this is not desired for in the configuration option $non_image_types.

On Linux the following will start the unoconv listener on startup so no need to worry about starting the listener on reboots.

Create a file /etc/init.d/local

#! /bin/sh
unoconv --listener &

Then:

sudo chmod +x /etc/init.d/local
update-rc.d local defaults 80