Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

HTMLToPDF generation fails when using OpenJDK 1.8



HTMLToPDF generation using PD4ML library fails when using OpenJDK 1.8.
HTMLToPDF works when using Oracle JDK 1.8.

Error Messages Caught exception while creating PDF from HTML stream 
Caused by: java.lang.NullPointerException 
at sun.awt.FontConfiguration.getVersion( ~[?:1.8.0_181-ojdkbuild] 
at sun.awt.FontConfiguration.readFontConfigFile( ~[?:1.8.0_181-ojdkbuild] 
at sun.awt.FontConfiguration.init( ~[?:1.8.0_181-ojdkbuild] 
at sun.awt.X11FontManager.createFontConfiguration( ~[?:1.8.0_181-ojdkbuild] 
at sun.font.SunFontManager$ ~[?:1.8.0_181-ojdkbuild] 
at Method) ~[?:1.8.0_181-ojdkbuild] 
at sun.font.SunFontManager.<init>( ~[?:1.8.0_181-ojdkbuild] 
at sun.awt.FcFontManager.<init>( ~[?:1.8.0_181-ojdkbuild] 
at sun.awt.X11FontManager.<init>( ~[?:1.8.0_181-ojdkbuild] 


Steps to Reproduce

Invoke the HTMLToPDF activity which calls the PDFUtils.generatePDF.

Root Cause

The OpenJDK package used did not have JDK. Instead, the package contained JRE.


Perform the following local-change:

Modify the Java package to a package with ‘Developer package included’.


Published November 30, 2018 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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