Skip to main content

Support Article

Exception occurs on generating PDF using the HTMLToPDF activity



Exception occurs while generating PDF using the HTMLToPDF activity post switching from Oracle Corporation Java(TM) SE Runtime Environment 1.8.0_162-b12 to OpenJDK Runtime Environment 1.8.0_181-b13.

Error Messages


[MSG][Exception][STACK][ Caught exception while creating PDF from HTML stream at com.pega.pegarules.integration.engine.internal.util.PDFUtilsImpl.generatePDF( at com.pega.pegarules.integration.engine.internal.util.PDFUtilsImpl.generatePDF( at com.pegarules.generated.activity.ra_action_htmltopdf_1fb93db6c5de0e7279a6f3991fc8440e.step8_circum0( at com.pegarules.generated.activity.ra_action_htmltopdf_1fb93db6c5de0e7279a6f3991fc8440e.perform( at com.pega.pegarules.session.internal.mgmt.Executable.doActivity( at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity( at com.pegarules.generated.activity.ra_action_createclaimspdf_380551dfc05ff49d90512a671f1c599d.step3_circum0( at com.pegarules.generated.activity.ra_action_createclaimspdf_380551dfc05ff49d90512a671f1c599d.perform( at com.pega.pegarules.session.internal.mgmt.Executable.doActivity( at
Caused by: java.lang.NullPointerException
at sun.awt.FontConfiguration.getVersion( ~[?:]
at sun.awt.FontConfiguration.readFontConfigFile( ~[?:]
at sun.awt.FontConfiguration.init( ~[?:]
at sun.awt.X11FontManager.createFontConfiguration( ~[?:]
at sun.font.SunFontManager$ ~[?:]
at Method) ~[?:
at sun.font.SunFontManager.<init>( ~[?:]
at sun.awt.FcFontManager.<init>( ~[?:]
at sun.awt.X11FontManager.<init>( ~[?:
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:
at sun.reflect.NativeConstructorAcce

Steps to Reproduce

  1. Use an activity in the flow processing as a Post processing activity
  2. Use this activity to invoke out-of-the-box HTMLToStream activity
  3. Use PDF generation. The exception occurs

Root Cause

A defect or configuration issue in the operating environment. An issue with the openjdk-8-jre-headless installation.


Make the following change to the operating environment:
Install the openjdk-8-jre (without headless).



Suggest Edit

Published February 12, 2019 - Updated February 25, 2019

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us