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

SA-16771

Summary



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" /> 
          </pega:static> 
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.


Resolution


 
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:

<html> 
<head> 
<pega:static type="style" app="webwb"> 
<pega:file name="ExportToPdfStylesCSS.css" /> 
</pega:static> 
</head> 
<body> 
<% 
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); 
out.println(sectionStream); 
%> 
</body> 
</html>

 
 

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

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.

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 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