Forum Bugs

Chinese Charatcers working on HTML page but not working in PDF on windows10

hmalviya
Hi,

I am facing one issue related to PDF, the HTML on the screen is perfect
but PDF output is replaced some of the Chinese chars with "?"

Please help me for the same.

Could someone provide me a step by step solution for that case?

Thanks in advance.
  1. invoice (7).pdf208.5 kB
    Please see attached pdf file
mikeday
Do you have Chinese fonts installed? Prince uses the MingLiU font for CJK text on Windows.
mikeday
Oh sorry I just realised it is only applying to some characters, can you check the Prince output log which will specify which characters had no glyphs?
hmalviya
I am new for the prince pdf, can you please tell me how to check the prince output log.
mikeday
If you are using the Prince GUI on Windows, the output log is displayed on the bottom left, and if you are running Prince from the terminal it will print the output log to the console or you can specify a log file using the --log option.
hmalviya
Thanks, Mike

I am generating it form my website which we have configured on my windows 10, where we are converting HTML content to pdf format using this library.

HTML contents are displaying properly, while we are generating PDF some of the contents are replaced by ?? in the PDF file.

Please advice.

Edited by hmalviya

mikeday
Can you try running it manually from the command-line on the HTML?
hmalviya
Hi Mike,

On the web, it is replacing some of the Chinese characters with the symbol ????, when I used the command line it is replacing all the chines characters with the ??????.

I have used below command.

C:\Program Files (x86)\Prince\Engine\bin prince C:\xampp\htdocs\princepdf\samplepdf.html --debug --verbose

Please find attached HTML and generated pdf file.

Thanks
  1. samplepdf.html3.4 kB
    HTML file
  2. samplepdf.pdf53.5 kB
    Generated PDF file