我使用mpdf(http://mpdf1.com/)生成1个pdf文件
<?php
$html = '... the body of the document encoded in UTF-8 is 收到的货品如有任 ...';
$mpdf=new mPDF();
$mpdf->allow_charset_conversion = true;
$mpdf->charset_in = 'utf-8';
$mpdf->WriteHTML($html);
$mpdf->Output();
?>
结果"... the body of the document encoded in UTF-8 is [][][][][][][][][] ...'"
,如何解决?
答案 0 :(得分:3)
尝试添加以下内容:
$mpdf->useAdobeCJK = true;
$mpdf->autoScriptToLang = true;
$mpdf->autoLangToFont = true;
检查它是否正常工作。