Trying to create a PDF file using wkhtmltopdf, but it gives me a lot of problems with displaying all characters.
Some of the characters work - for example. when printing
- "Invoice No. (付款 编号)" The Chinese character No. 1, 2 and 4 is correctly printed, but the character No. 3 simply displays the empty space in PDF format.
- "Customer number (客户 编号)" The Chinese character No. 1 and 4 are displayed correctly, but the characters No. 2 and 3 are not displayed in the PDF file.
- "Total (总额)" none of the Chinese characters are displayed in the generated PDF file.
I am on a Ubuntu 14.04 desktop with wkhtmltopdf version "wkhtmltopdf 0.12.1 (with qt fixed)". I installed Chinese fonts and all the characters are displayed correctly in both gedit and Firefox on my system, but wkhtmltopdf only displays about 75%.
My HTML document is made using the UTF-8 character set and displays correctly in Firefox and gedit. I also tried to embed the font directly in the header style section using the tag
src: url (data: font / ttf; base64, AAEA ....)
, and wkhtmltopdf changes the font as expected, but the missing characters are still missing.
Any help is really much appreciated as I get ideas.
source share