Issue
-
The preview is not generated for the documents in the Document and Media portlet. The following warn messages are thrown in the logs,
INFO [liferay/document_library_pdf_processor-1][SocketOpenOfficeConnection:114] trying to (re)connect
WARN [liferay/document_library_pdf_processor-1][BaseProcessorMessageListener:40] Unable to process file version 4409510
Environment
- Liferay DXP 7.0, 7.1 and 7.2
Resolution
-
The warn message indicates that the Liferay is trying to connect with OpenOffice, but OpenOffice refuses the connection. Restarting the LibreOffice or OpenOffice resolves the issue and the preview gets generated
-
Follow the below command to start LibreOffice or OpenOffice in server mode
soffice --headless --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard
-
Additional Information
- Liferay DXP comes pre-bundled with PDFBox for generating automatic previews for PDF types of documents. You should install three additional tools that offer higher quality previews and document conversion functionality: OpenOffice or LibreOffice, ImageMagick, and Xuggler.
- For more information on generating previews in Liferay, please visit these articles,