使用 mpdf 时导出为 PDF 时出错 php

Error php export to PDF when use mpdf

我使用 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 [][][][][][][][][] ...'",如何解决?

尝试添加这些:

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

检查它是否正常工作。