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

Unable to view logo image on converted PDF



PRPC is unable to render images to PDF. These images are created using out-of-the-box htmltoPDF activity.

Error Messages

Not Applicable 

Steps to Reproduce

Create an activity, which calls HTMLtoPDF function to generate and view a PDF.

Root Cause

A defect or configuration issue in the operating environment. User has created a Rule-File-Binary from a Save As of the original rule which created a problem as pzInsKey and pzOriginalInstanceKey are different (as explained below) from the RULE-XML of RULE-FILE Binary.  

As it was created as a Save As, the pzOriginalInstanceKey was refering to the original instance instead of the new rule created. The extension of file that has to be given while creating the Rule-File-Binary should be in JPG format. The name of the image file and also the Rule-FIle-Binary contains mixed formats ( for example, ClearRiverLake.JPG)


Perform the below local-changes.
  1. Remove the custom java code and use OOTB HTMLtoPDF activity.
  2. The extension of file that has to be given while creating the Rule-File-Binary should be in the format "jpg".
  3. The name of the image and also the Rule-File-Binary name has to be in lower case letters (for example, abc.jpg)
  4. Create all the Rule-File-Binary as new rather than Save As
  5. Set the param.isClearCache to "true"

When the HTMLtoPDF activity is run for the fist time after creating a image (Rule-File-binary), it will load the image from:
<Pega-Temp Dir>StaticContent\common\<Opertorid>\<Directory>\Sample.jpg  ( Example : Temps\StaticContent\common\393ad5d1a6165a3dfed3521ea3c37228\webwb\px.jpg)

Then the image will be cached under StaticContent\autogenerated\Rule-File-Binary\autogenerated\Rule-File-Binary 

Next successive runs of the HTMLtoPDF will render the image from the "autogenrated" folder rather than static content directory of Pega temporary.

To make the image load continously from StaticContent or common folder, set param.isClearCache  to "true"

An enhancement request (FDBK-13593) is raised to add the feature to enable setting custom  Margins for the generated PDF.

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

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