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

HtmlToPDF creates PDF files incorrectly



The font size used in the correspondence rules is not retained in the PDF generated using the  HTMLToPDF activity.

Error Messages

Not Applicable. 

Steps to Reproduce

1. Create a Correspondence Rule.
2. Make the Font as Courier new and size as 12px .
3. Generate the PDF and check in Microsoft Document, the Font size is 10.

Root Cause

Microsoft outlook/document uses Points(pt) and RTE uses Pixels for font size. This is the reason there is a mismatch in converting the size. An example of the simple chart taken from internet :


Below local changes and explanation has been suggested: 

1. Appropriate px value is needed to get the right pts.

2. When the text is copied from MS Outlook or MS Word document to RTE, it increases the discrepancies. If the content is entered manually in the Correspondence Rule, RTE does not include any extra span tag. This will help in getting right pixel.

Text copied from Microsoft outook/document :

Text manually entered:

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