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

PDF download not picking skin rule styles



Generated PDF does not reflect styles from the Application skin.

Error Messages

No Error Message.

Steps to Reproduce

1. Create a Section (Step-1) having a button field. 
2. This Button has On-Click Refresh action which is calling a custom activity (CustomHTMLtoPDF). 
3. Create CustomHTMLtoPDF which is again calling the OOTB activity HTMLtoPDF. 
4. Create a non auto-generated HTML Section (Step-2) which contains following code: 

          <pega:static type="style" app="webwb"> 
          <pega:file name="ExportToPdfStyles.css" /> 
You may change the name of CSS file accordingly. 

5. Create a 3rd Section (Step-3) which is being called by Activity. (Stream name for the Activity is Step3)

Root Cause

An issue in the custom application code or rules.


In the non auto-generated HTML Section, include the CSS file (ExportToPdfStylesCSS) in the head and include the Section (Step3) in the body.
This can be done in the following way:

<pega:static type="style" app="webwb"> 
<pega:file name="ExportToPdfStylesCSS.css" /> 
StringMap sectionListKeys = new HashStringMap(); 
sectionListKeys .putString("pxObjClass", "Rule-HTML-Section"); 
sectionListKeys .putString("pyClassName", "DEMO-pdf-Work"); 
sectionListKeys .putString("pyStreamName", "Step3"); 
String sectionStream = tools.getStream(sectionListKeys, null); 


Suggest Edit

Published January 31, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

0% found this useful

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