12
Views
1
Comments
[AdvancedHtmlToPDF] Not able to generate PDF with bold text using AdvancedHtmlToPDF (ODC)
AdvancedHtmlToPDF
Forge asset by Xebia USA Inc.
Application Type
Traditional Web

I am currently having trouble making any text bold or changing font-weight using the AdvancedHtmlToPDF forge component. Is this a known issue? Any help would be appreciated. 


I've already tried: 
-Using the bold tag <b>.
-Using the strong tag <strong>.
-Using CSS class (.bold-class {font-weight: bold;}) applied to the element.
-Using inline CSS: <p><span style='font-weight: bold;'>Hello World!</span></p> 
-Using <em> tag and inline CSS: <em style='font-weight: bold;'> 

2024-10-09 04-44-30
Bhanu Pratap

The issue with bold text not rendering in PDFs generated by AdvancedHtmlToPDF (which uses iText) often occurs because the converter doesn't automatically apply bold variants unless a supported font-family is explicitly specified.

Try Adding font-family: helvetica; (or times) to your styles — these are standard PDF fonts with built-in bold support in iText.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.