Legacy Knowledge Base
Published Sep. 10, 2025

PDFBox Causing JVM Crashes

Written By

Brett Ripley

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

This article is a legacy article. It applies to previous versions of the Liferay product. While the article is no longer maintained, the information may still be applicable.

This article describes an issue inherent in the PDFBox library that causes a JVM crash upon image conversion.

Resolution

  1. Due to this PDFBox library issue which is in operation by default within the Liferay Portal, one solution would be to switch to using ImageMagick instead of PDFBox. To do this, enable ImageMagick in the portal-ext.properties:
    imagemagick.enabled=true
    imagemagick.global.search.path=[Your ImageMagick Path]
    Keep in mind that you must install Ghostscript and Imagemagick. See Ghost Script and Image Magick for more information.
  2. Another solution would be to open a ticket with our Support team and request for the solution on LPS-37243.

Additional Information

If you’re unable to properly use ImageMagick, you may need to update to the latest version (ImageMagick 6.7.9-6 2012-09-25 Q16 or later). See LPS-30291 for information on efforts to identify incompatible application versions with Liferay Portal.

LPS-32257: PDFBOX 1.6 Cause Tomcat Crash on Big PDF Files.

Did this article resolve your issue ?

Legacy Knowledge Base