Support Article
Blank PDF document generated when using HTMLToPDF
SA-18986
Summary
PDF documents are no longer generated when using the HTMLToPDF activity after installing HFix-24518. The activity executes successfully but a blank PDF document is created.
Error Messages
Caused by:
java.lang.NoClassDefFoundError: org.w3c.css.sac.CSSException
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:72)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
at org.zefer.html.doc.PD4MLHtmlParser.o00000(Unknown Source)
at org.zefer.html.doc.PD4MLHtmlParser.<init>(Unknown Source)
at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)
at org.zefer.pd4ml.PD4ML.render(Unknown Source)
at com.pega.pegarules.util.PDFUtilsImpl.generatePDF(PDFUtilsImpl.java:328)
at com.pega.pegarules.util.PDFUtilsImpl.generatePDF(PDFUtilsImpl.java:423)
Steps to Reproduce
- Install HFix-24518.
- Use the HTMLToPDF activity to generate a PDF document.
Root Cause
The NoClassDefFoundError occurred for the CSSException, class because there were multiple versions of the pd4ml.jar present in the environment.
The pd4ml.jar file was not being loaded from the \lib\pega directory where the ss_css2.jar file was present. The ss_css2.jar file contains the CSSException class. After the NoClassDefFoundError was resolved, a blank PDF document was still generated due to the handling of the pyHTMLDisableProcessing parameter.
Resolution
- The NoClassDefFoundError for the CSSException class was resolved by removing the additional pd4ml.jar file from the environment so it was instead loaded from the \lib\pega directory.
- Install HFix-25614 so the pyHTMLDisableProcessing parameter is handled properly.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.