I'm using Prince in a laravel php project.And I cannot understand how can Chinese show in the pdf but "??"....
Forum › How do I...?
Chinese problem with Prince PHP version
You need to have Chinese fonts installed on the server. Which operating system are you running Prince on?
Linux.
I did't realize that no Chinese fonts on the server.
Thanks for your patience to reply my every question(from emails and here).I'll try this solution.
I did't realize that no Chinese fonts on the server.
Thanks for your patience to reply my every question(from emails and here).I'll try this solution.
If you know which Linux distribution I can suggest appropriate packages. For example, Ubuntu has the fonts-arphic-ukai and fonts-arphic-uming packages with Chinese fonts.
Oh, so the PDF is working but not the terminal? That is a different question, I didn't realise. Now it depends which terminal application you are using, and how you are connecting to the server. But do you even need to see Chinese characters in the terminal itself?
No need...I make the question complex.My main goal is to show Chinese in PDF.Now I know that there is need to have Chinese fonts on the server, but the biggest question to me now is how install Chinese fonts to the operating system...
The yum command above should be enough to install the fonts, if you run it as root. You can see which fonts are installed by running "fc-list".
Did you rerun Prince to regenerate the PDF? Did Prince give warning messages about missing glyphs?
Also have you customised fonts.css at all? I notice that Times New Roman is not installed on the server, just Arial.
Finally, the problem was resolved.
I did't distinguish that docker is a Ubuntu system in the CentOS system...So what I have done before is a little meaning.
Thanks for your help sincerely.
I did't distinguish that docker is a Ubuntu system in the CentOS system...So what I have done before is a little meaning.
Thanks for your help sincerely.