Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Creating PDF files by using a compact style sheet

Updated on November 15, 2021
Applicable to Theme UI-Kit applications

Accelerate the creation of PDF files and improve rendering of their components by using compact style sheets.

When you create a PDF file by using the Create PDF smart shape in a case type or by using the HTMLtoPDF activity, use the pyCompactStylesforPDF compact style sheet instead of the style sheet that is used by the application skin.

Note: PDF is a restrictive format that forces hard constraints on settings such as margins or layouts. Consequently, the HTMLToPDF rule does not support the conversion of dynamic layout groups. As a best practice, use free form layouts or smart layouts with forms that you want to print to PDF.

The compact style sheet helps the system render the following elements in PDF files:

  • Text input
  • Formatted text
  • Dynamic layout formats, including default, stacked, inline double grid, inline triple grid, and inline grid quadruple
  • Heading levels 1 through 6
  • Header icons
  • Collapsible, bar, and fieldset header types

To use the compact style sheet, enable the UseCompactStylesforPDF dynamic system setting by performing the following steps:

  1. In Dev Studio, search for UseCompactStylesforPDF and click the result that appears in the dialog box.
  2. On the Settings tab, in the Value field, enter true.
  3. Click Save.

Have a question? Get answers now.

Visit the Support 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.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us