Posted: 28 Aug 2020 8:54 EDT Last activity: 28 Aug 2020 11:56 EDT
How to generate PDF documents using custom fonts
How to use custom fonts in Pega paragraph rules and activity for generating PDF
I found quite time consuming to install custom fonts and use those for generating a pdf document through the HtmlToPdf activity, therefore I decided to share the steps for achieving that. The solution has been tested on Pega 8.1 which uses P4DML version 3100.PRPC1 Pro.
The high levels steps are:
Enable logging by setting the PdfUtilImpl logger to DEBUG
Install custom fonts
Define CCS stylesheet
Create an HTML rule to be passed to the HtmlToPDF activity for rendering the Html stream
Set Dynamic System Settings for Fonts and Props folders [optional]
Create a test activity to generate the PDF document through the HtmlToPDF OOB activity
Detailed instructions are described in the attached document. Hope you find it useful.
***Edited by Moderator Marissa to change Type from General to Product; update Platform Capability tags; add Developer Knowledge Share tag****