Automatic PDF previews for Office documents (censhare Client)
An installation of OpenOffice or LibreOffice can be used to create PDF from various Office formats. From this PDF, the preview is rendered. Native OpenOffice document formats are integrated.
Supported formats
The following formats are supported:
MIME-Typ | Suffix | Processor |
MS-Word document OOXML | docx | Thumbnail extraction, optional OpenOffice |
MS-Word document with macros, OOXML | docm | Thumbnail extraction, optional OpenOffice |
MS Word template with macros, OOXML | dotm | Thumbnail extraction, optional OpenOffice |
MS Word template OOXML | dotx | Thumbnail extraction, optional OpenOffice |
MS Excel document OOXML | xlsx | Thumbnail extraction, optional OpenOffice |
MS PowerPoint document OOXML | pptx | Thumbnail extraction, optional OpenOffice |
MS Word document | doc, dot | OpenOffice |
MS Excel document | xls | OpenOffice |
MS PowerPoint document | ppt | OpenOffice |
OpenDocument text | odt | OpenOffice |
OpenDocument template | ott | OpenOffice |
OpenDocument spreadsheet | ods | OpenOffice |
OpenDocument spreadsheet template | ots | OpenOffice |
OpenDocument presentation | odp | OpenOffice |
OpenDocument presentation template | otp | OpenOffice |
OpenDocument drawing | odg | OpenOffice |
OpenDocument drawing template | otg | OpenOffice |
OpenOffice.org 1.0 Text | sxw | OpenOffice |
OpenOffice.org 1.0 text template | stw | OpenOffice |
OpenOffice.org 1.0 spreadsheet | sxc | OpenOffice |
OpenOffice.org 1.0 spreadsheet template | stc | OpenOffice |
OpenOffice.org 1.0 presentation | sxi | OpenOffice |
OpenOffice.org 1.0 presentation template | sti | OpenOffice |
OpenOffice.org 1.0 drawing | sxd | OpenOffice |
OpenOffice.org 1.0 drawing template | std | OpenOffice |
RTF file | rtf | OpenOffice |
"Open Office" as a processor in this context always means that either OpenOffice or LibreOffice create the PDF.
The process responsible for generating new previews detects whether an OpenOffice / LibreOffice configuration has been activated in the image service. When OpenOffice integration is disabled, assets are ignored with a warning in the server log file.
When OpenOffice is used, the temporarily generated PDF files are preserved under the asset. In the settings there are file types available whose key starts with "pdf".
At present it is not yet possible to specify PDF settings programmatically, such as downsampling of images, font embedding, PDF/X-3, etc. In test operations it has been proven that the values of OpenOffice PDF exports had an impact on the later PDF export operation with the server.
The quality of the preview is only as good as how OpenOffice / LibreOffice can handle foreign formats. This has to be tested for each individual case. An obvious example are marginal notes in Word (. Doc) which are not rendered correctly. Because the preview is obtained from the PDF, the configuration of GhostScript as an image service will also be required.
Configuration
Configuration is performed in two places. Once under Modules · Previews · Preview Preferences and also under Services · Image. The default TCP port for communication with OpenOffice / LibreOffice is 9980, but may be changed if required.
If the rendering of Office previews by the censhare Service-Client does not work right away, it helped to upgrade to the latest available version of the free Office. On the Mac you may need to launch a freshly installed Office suite at least once manually, otherwise e.g. LibreOffice will remain unresponsive after the first launch using the script. Then you can continue to use the shell script as recommended to start LibreOffice. For complex documents, OpenOffice sometimes renders white pages, while for the same document LibreOffice calculates an incomplete or incorrect preview. You might want to run in headless mode to hide the Office application while rendering.