After hours of pulling my hair, it worked wonders for me :)
(In my case, ΰ€¬ΰ₯ΰ€ΰ₯ΰ€ΰ₯ΰ€Έ showed up as ??????)
$ mpdf-> SetAutoFont ();
$mpdf = new mPDF('utf-8','', 0, '', 15, 15, 16, 16, 9, 9, 'L'); $mpdf->SetAutoFont(); //~ Nothing of below worked :( //~ $mpdf->useLang = true; //~ $mpdf->autoScriptToLang = true; //~ $mpdf->autoLangToFont = true; //~ $pdf_html = mb_convert_encoding($html, 'UTF-8', 'UTF-8'); $mpdf->WriteHTML($html); //~ $mpdf->DeletePages(2); $filename = date('ymdhis').".pdf"; $mpdf->Output($filename,'D');
My PDF contained a mixture of English and Hindi words such as
"3 units ΰ€¬ΰ₯ΰ€ΰ₯ΰ€ΰ₯ΰ€Έ for $ 10.00 / unit."
source share