iText7 Generated PDF Style and Font
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2020 09:15 PM
Hi,
It is also known that the generated PDF do not respect html styling like fonts. And this was mainly due to using iText5.
I am using code in this KB KB0866613 to generate a PDF from a record using the new API sn_pdfgeneratorutils.PDFGenerationAPI().
But now that Paris release supports iText7 via the HR system property sn_hr_core.itext7.pdf_conversion (check here), is there a way to enable iText7 without having the HR module enabled?
In another word, how can we style PDF body with different fonts in Paris?
Thanks!
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2021 01:21 AM
Have you found a solution to this? I'm trying to generate PDF with Arial as a main font, but don't know what parameter to pass to sn_pdfgeneratorutils.PDFGenerationAPI()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2021 11:26 AM
Hi!
I have the same problem too. Looking in Style here:
There is no function to call to set the font like "Arial", "Times New Roman" or whatever.
Did you find a solution?
Regards,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2021 10:58 AM
I've just posted an article on the usage of the PDFGenerationAPI, maybe this will help you out