mpdf not supporting arabic and chinese fonts

pavan kumar picture pavan kumar · Mar 6, 2014 · Viewed 8.9k times · Source

I am using mpdf. When I supplied the arabic and chinese words to the WriteHtml(), the resulting pdf containing square boxes instead of those fonts.

Please suggest!

Sample fonts:

I am testing أنا العالم 我的世界

Answer

jonnybradley picture jonnybradley · Mar 19, 2016

On mPDF 6.0, we found this made Cantonese work for us:

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

Seems SetAutoFont is now deprecated.