We want to convert HTML to PDF using the iText7_PDF library.The document content includes Thai characters, and we need the PDF output to support Thai language.Currently, only English text is rendered correctly, while Thai characters are missing.What steps are required to properly render Thai text when converting HTML to PDF with iText7_PDF?Thank you very much.
Hello @sahatsawat kthasattapich ,
This is likely a font-related issue. You need to use a font that supports Thai glyphs and ensure it’s properly included and used in your HTML.
You can refer to this guide for details on configuring fonts:
Using fonts in pdfHTML .
Additionally, this article might be helpful for further context and troubleshooting.
Displaying text in different languages in a single PDF document
From what I’ve read, it seems that pdfCalligraph is required to correctly render Thai text in PDFs. However, we would prefer not to use a Custom .NET Extension.
Is there any alternative approach that would allow Thai text to be displayed correctly without using pdfCalligraph or a custom extension?
Thank you very much Mihai.
You can try adding a font that allows Thai characters in the font provider and test if the text is rendered correctly:
Adding selected fonts to the font provider
After carefully reviewing the link you shared with us, we found that it works. However, we need to write the HTML and add a font-family resource that is actually supported as well. Your recommendation was very helpful thank you very much.