java - Unicode chars are converted to broken symbols when I use wkhtmltopdf -
I have HTML that contains some Unicode characters, and saved in "UTF-8" in the disk. I can use less to display it, all the characters are displayed well:
& lt; H1 & gt; One "?? Ĺ ?? Æ ?? Action? & Lt; / H1> & Lt; P & gt; Playç¨ ?? ź ?? Æ ?? ¥ æ ?? ¶å ?? Degree celsius ŧ§Ã ?? One ???? E. æ ± ?? I ¼ ?? É ?? ½æ ?? C ?? ± & LT; Code & gt; Action & lt; / Code & gt; Æ ?? ¥ å¤ ?? Ç ???? Ç ???? à ???? But when I use "wkhtmltopdf" to convert it to PDF, it shows broken letters:
My order is:
wkhtmltopdf - encoding utf-8 book. Html book.pdf how to fix it? Finally I found the reason: I do not have Unicode fonts in my ubuntu server
P> I upload some TrueType fonts from my local Ubuntu server, everything works fine. Freewind: / usr / share / fonts $ cd truetype / freewind @ freewind: / usr / share / fonts / truetype $ ls arphic ttf-dejavu ttf-lao free font ttf-devanagari -fonts ttf-liberation kochi ttf-hindi-fonts ttf-malayalam-fonts msttcorefonts ttf-ask-fonts-core ttf-oriya -fonts Open Office ttf-japanese-gothic.ttf ttf-punjabi-fonts sazanami ttf-japanese-mincho Ttf ttf-tamil-fonts takao ttf-kacst-one ttf-telugu-fonts Thai ttf-kannada-fonts unfonts ttf-bengali- I just upload them all, this is Fixes the problem, although I do not know which font is the key.
Comments
Post a Comment