Support Article
HtmlToPDF creates PDF files incorrectly
SA-7985
Summary
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 :
Resolution
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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.