3

In our application we have a section where you can open a PDF through the browser. It opens without a problem in all the countries but China. It just doesn't display the text with chinese characters, but if I download the PDF and I open it with Acrobat Firefox or Explorer, it works fine and shows the characters.

Some snapshot to illustrate you:

Snapshot 1 - Chrome opens the PDF and the bug shows up:

Chrome opens the PDF and the bug shows up

Snapshot 2 - Firefox, Explorer and Acrobat shows:

Firefox, Explorer and Acrobat shows

Tested with Firefox, Chrome, Vivaldi and even Internet Explorer, and only fails in Chrome in the last stable version 62.0.3202.94

We use the library mPDF 6.0, and I used all the methods they propose to solve idiomatic problems (autoLangToFont) but nothing seems to work for Chrome.

I've been working on this for a few days, but I can't fix it by my own. Do you know something about it? It's a Chrome bug?

Edit: We use UTF-8 for the encoding, also tried to change it to BIG5, or others with chinese compatibility and it doesn't work

Thank you, have a nice day!

mkl
  • 90,588
  • 15
  • 125
  • 265
David
  • 161
  • 1
  • 9
  • have you looked at the encoding it thinks the file is in? – mplungjan Nov 14 '17 at 13:14
  • Yeah, and thank you for remind me it, I added the encoding to the main post. We use UTF-8, but I tried to change it to other (BIG5) and it still doesn't work :/. Thank you – David Nov 14 '17 at 13:19
  • 1
    What about an example PDF? – Jan Slabon Nov 14 '17 at 19:36
  • I can't give you an example PDF for company privacy reasons :/, sorry – David Nov 15 '17 at 07:50
  • 1
    Without a representative example it is difficult to help. – mkl Nov 15 '17 at 11:03
  • I had a similar scenario and was using pdf.js. Turned out that the path to the cmaps path in the viewer.js file was not correct. Opening Chrome DevTools may point you in the right direction--that's how I found it. HTH – user11809641 Sep 16 '19 at 05:21

0 Answers0