Support Article

Font in PDF generated is inconsistent

SA-74548

Summary



The PDF generated through a SmartShape in the flow and through the pxcreatePDF in the activity differs in font size. This occurs despite invoking the HTMLToPDF activity in both the flows.


Error Messages



Not Applicable


Steps to Reproduce

  1. Configure a flow with a SmartShape to create a PDF.
  2. Configure an activity to use pxcreatePDF to generate the same PDF. The font size for the PDF differs in both.


Root Cause



An issue in the custom application code or rules.
Section contained a grid layout that was corrupted.



Resolution



As a local-change, recreate the corrupted grid layout.

From Pega 7.4 onwards, the 'UseCompactStylesForPDF' a Dynamic System Setting (DSS) is introduced. When the DSS is set to true, the application skin is not imported to the PDF. Instead, a bare minimum CSS is present which must be provided in the pyCompactStylesForPDF.css available rule containing default styles. This CSS can be overridden. With this setting enabled, the CSS will be consistent for all PDFs.

Alternatively, instead of enabling the DSS setting, pass the UseCompactStylesForPDF parameter to the HTMLToPDF activity with value 'true'.

Published March 1, 2019 — Updated March 12, 2019

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.