Using the APS LibreOffice plug-in to generate previews for Office files

The LibreOffice APS Plug-In allows FocusOPEN to generate previews and thumbnails of Office documents such as Word and PowerPoint. It uses the headless mode of the open source Office alternative, LibreOffice, to avoid the need for commercial third party .NET components.

LibreOffice portable edition is recommended to reduce the footprint of the installation on a server where the FocusOPEN APS in installed.

A copy of LibreOffice portable and the FocusOPEN APS DLLs is here:

Deployment Instructions

The following instructions are suitable for FocusOPEN 3.4.6 and above. The LibreOffice plug-in is not supported in previous editions and has not been tested.

Install LibreOffice Portable to a folder, e.g C:\LibreOfficePortable\

Open the APS Config\Plugins.config file and insert the following plugin stanza into the plugins node

  type="FocusOPEN.APS.LibreOfficeProcessingPlugin, FocusOPEN.APS.LibreOffice"
  extensions="doc, docx, dot, rtf, ppt, pps, pptx, ppsx, xls, xlsx, odt, ods, odp"
      <add key="LibreOfficePath" value="C:\LibreOfficePortable\App\libreoffice\program\soffice.exe" />
      <add key="ConvertToPdfArgs" value="--headless --convert-to pdf [INPUT] --outdir [OUTPUTFOLDER]" />
      <add key="ColorProfilesPath" value="C:\Program Files (x86)\FocusOPEN Software\FocusOPEN Asset Processing Service\ColorProfiles" />
      <add key="ImageMagickPath" value="C:\Program Files (x86)\ImageMagick-6.6.3-Q16" />
      <add key="ImageMagickConvert" value="##ImageMagickPath##\convert.exe" />
      <add key="ImageMagickComposite" value="##ImageMagickPath##\composite.exe" />
      <add key="ImageMagickIdentify" value="##ImageMagickPath##\identify.exe" />
      <add key="ColorspaceProfileCMYK" value="##ColorProfilesPath##\CMYK\USWebCoatedSWOP.icc"/>
      <add key="ColorspaceProfileRGB" value="##ColorProfilesPath##\RGB\AdobeRGB1998.icc" />
      <add key="ImageColorspaceArgs" value="-format %r [INPUT]" />
      <add key="ResizeImageArgs" value="-limit thread 1 -colorspace RGB -quality 90 -resize [WIDTH]x[HEIGHT] [KEEPASPECTRATIO] [INPUT][0] [OUTPUT]" />
      <add key="ResizeImageCMYKArgs" value="-limit thread 1 -quality 90 -layers flatten [INPUT][0] -profile [COLORSPACEPROFILECMYKPATH] -profile [COLORSPACEPROFILECMYKPATH] -quality 90 -resize [WIDTH]x[HEIGHT] [OUTPUT]" />

Change the LibreOfficePath key to the location where LibreOffice is installed, e.g


Check the ColorProfilesPath and ImageMagickPaths to reflect the values used for other plug-ins (e.g. ImageMagickProcessingPlugin) Restart the APS service and check the APS log files, a line like this one should be visible:

FocusOPEN.APS.ProcessingService - Name: LibreOfficePlugin, Enabled: True

Login to the FocusOPEN web application with an engineer-enabled Super Administrator account and navigate to Admin > Utilities > Diagnostic Tools > Asset Processing Server Info

Office extensions such as doc, docx, ppt, pptx etc. should be included in the list of extensions.

Going to Admin > Content > Manage File Extensions should show a 'Y' in the APS column next to a number of common Office extensions.

Upload an example Office file such as Word or PowerPoint and a preview should be generated.

Source Code The LibreOffice APS plug-in source code is available here.

libreoffice-aps-plugin.txt · Last modified: 2014/03/24 03:39 by admin