We are using htmltopdf component. However when generating PDF exported file, for chinese characters it is shown in form of boxes. Hence, can anyone suggest a good solution/ work around. Thanks in Advance.
Hi Praveen,
It seems like a character set problem. You can get some information from https://en.wikipedia.org/wiki/Chinese_character_encoding about Chinese character sets.
Cheers
Have you tried to work with the custom settings of wkhtmltopdf?
Those plugins all use that tool, you can get all the info in: https://wkhtmltopdf.org/usage/wkhtmltopdf.txt
try and you these setting:
--encoding <encoding>
If that won't work, consider using the HtmlToImage instead of the PDF one.
Hope it helps.
Hi Hugo,
we tried both --encoding UTF-8 and --encoding ISO-2022-CN. Both options failed. Following command line options we have tried.
wkhtmltopdf --encoding ISO-2022-CN <url> c:\poc\test.pdf
wkhtmltopdf --encoding UTF-8 <url> c:\poc\test.pdf
Let us know if we are missing any thing.
Hi again,
have you checked library resources in your wkhtmltopdf?
From what i'm checking on multiple foruns Russian/Germanic/Asian characters have that problem, most of the times if you download the libraries in question it solves the problem.
Here's a link:
https://stackoverflow.com/questions/11859872/wkhtmltopdf-encoding-issue
Other way is for you to force the encoding in your CSS to the one that supports your encoding, i don't know if UTF-8 supports all assian characters, but you can try it:
<meta charset="UTF-8" />