Forum How do I...?

Chinese problem with Prince PHP version

Ron.STCD
I'm using Prince in a laravel php project.And I cannot understand how can Chinese show in the pdf but "??"....
mikeday
You need to have Chinese fonts installed on the server. Which operating system are you running Prince on?
Ron.STCD
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.
mikeday
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.
Ron.STCD
CentOS Linux 7(Core)
mikeday
Try this:
yum install cjkuni-uming-fonts cjkuni-ukai-fonts
Ron.STCD
Just this command enough?What else need I do?
  1. test.png7.0 kB
    Still show '?'...
mikeday
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?
Ron.STCD
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...
mikeday
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".
Ron.STCD
No change...
  1. test3.png67.7 kB
    Still '?'...
mikeday
Did you rerun Prince to regenerate the PDF? Did Prince give warning messages about missing glyphs?
mikeday
Also have you customised fonts.css at all? I notice that Times New Roman is not installed on the server, just Arial.
Ron.STCD
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.