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

Generated PDF is not properly displaying custom font



A custom font has been configured in the parameters for PDF generation; however, the generated PDFs are not including the expected font. On the screen, HTML review shows the proper characters but the PDF does not due to a missing embedded font. User verified the font file is available on the server in the specified directory.

Error Messages

Not Applicable

Steps to Reproduce

  1. Place font in accessible server directory.
  2. Create HTML stream with characters needing special font.
  3. Apply cell inline style to cells in the repeat grid text area control (on Presentation > Advanced Presentation Options).
  4. Call activity pyViewAsPDF, which in turn uses HTMLToPDF.

Root Cause

An issue in the custom application code or rules.

The section that was rendered depended on two fonts defined in the skin; however, the custom section was using specific style information within some cells of the repeat. This overrides the style so the proper font was not used.


Perform the following local-change steps:
  1. Ensure the parameters to pyViewAsPDF include the parameter pyPDFFontsDirectory with the proper directory for the font file and the parameter pyPDFEmbendFont set to true.
  2. Also add font-family:SpecialFont1,SpecialFont2 to the existing cell inline style to elements which need it. 


Suggest Edit

Published December 26, 2016 - Updated October 8, 2020

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.

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