marcbachmann / node-html-pdf

This repo isn't maintained anymore as phantomjs got dreprecated a long time ago. Please migrate to headless chrome/puppeteer.
MIT License
3.56k stars 543 forks source link

Japanese characters not showing correctly on PDF #447

Open typing101 opened 6 years ago

typing101 commented 6 years ago

I'm using a font that supports Japanese characters (Lato), everything shows fine when the PDF is purely English, but when I throw in some Japanese characters it doesn't render them. I'm thinking it's an encoding issue, but I'm not sure how to set encoding type once the PDF is rendering.

nontachaiwebdev commented 6 years ago

I have a same problem. Did you fixed it ?

FeLiX-LiM commented 6 years ago

Chinese characters cannot be displayed in CentOS7

mvelosus commented 6 years ago

I have the same issue with pt-br chars like ç and ã.

Gujie-Novade commented 5 years ago

You need to install the proper fonts on your server. For me on Ubuntu it was:

sudo apt-get install language-pack-ja
sudo apt-get install japan*
sudo apt-get install language-pack-zh*
sudo apt-get install chinese*
mewelling commented 5 years ago

@Gujie-Novade your solution worked for me. Thanks!