Chinese wording garbled when generate PDF

Hi,

I have across invoiceplane and I were very surprised with the feature of it. But recently i have a problem when generating PDF. All Chinese words that generated in PDF are garbled. I try to check the charset but it seems to be normal as all charset is in UTF-8 both .php files & server database. Anyone could helps on this matter?

Sorry for my poor english.

You have to use a font that is capable of displaying chinese characters. Fonts that support the characters were removed from the package because they double the size.

See Own fonts in PDF ... possible? for custom fonts.

I have found that adding $mpdf-> autoLangToFont = true; under $mpdf->autoScriptToLang = true; works for me. It’s under \application\helpers\mpdf_helpers.php

$mpdf->autoScriptToLang = true;
$mpdf->autoLangToFont = true;
1 Like