2

When I look on the FPDF website, I get code that looks like this:

$pdf->Write(10,'³É¶¼ÊÐÎäºîÇøÈËÃñÕþ¸®Îļþ ');

Yet when I test it on my server, it displays actual chinese characters.

However, when I type the code:

$pdf->Write(10,'你好'); //the actual chinese characters

I get random chinese characters instead of the ones I typed in the code.

Does any one know how to convert chinese to the symbols in the first example, or tell me what I am doing wrong?

HoldOffHunger
  • 18,769
  • 10
  • 104
  • 133
  • 1
    possible duplicate of [Why are asian unicode characters not appearing on PDF using FPDF in PHP?](http://stackoverflow.com/questions/3536044/why-are-asian-unicode-characters-not-appearing-on-pdf-using-fpdf-in-php) –  Jul 13 '14 at 23:03
  • It is very easy and quite possible! The problem is solved by using tFPDF and having a font WITH the language character range you need (i.e., WindowsHelvetica.ttf does not have Chinese). Take a look at my answer here: https://stackoverflow.com/a/56429391/2430549 – HoldOffHunger Jun 04 '19 at 16:29

0 Answers0