Support Article
Font sizes are generated incorrectly in MS Word
SA-70107
Summary
When referring to content through the correspondent rule, font sizes are generated incorrectly in MS Word. Some specific font sizes do not work (for example, 12 of Arial, and Times NewRoman).
Error Messages
Not Applicable
Steps to Reproduce
- Create a word template and refer the correspondence rule.
- Include a section in the correspondence.
- Provide the font size of the referred correspondence rule or section as 12pt .
- Pass the Word template using pzGenerateDocument to generate a Word document. In the generated document, the font size falls to 11pt or 10pt for that correspondence rule only.
Root Cause
Issue with MS Word. Only the <p> tag styles are taken in to consideration correctly and not the <div> tags.
Resolution
Here's the explanation for the reported behavior:
- The Pega document generation API appends the correct HTML chunk to the document body. Whereas, the generated document does not honour the styles.
- When a section is included in the correspondence, the <div> tags are generated for that section. MS word does not accept 12pt font size for those tags.
Published January 4, 2019 - 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.