mPDF v8 中文乱码问题的修复
发表于:2023-04-06 11:27:13浏览:1199次
收藏
传入以下参数或者修改ConfigVariables.php配置文件即可
路径:vendor\mpdf\src\Config\ConfigVariables.php
'autoScriptToLang' => true,
'autoLangToFont' => true,
'useSubstitutions' => true,
DEMO:
$mpdf = new \Mpdf\Mpdf(['mode'=>'utf-8','format'=>'A4','useSubstitutions'=>true,
'useAdobeCJK'=>true,'autoScriptToLang'=>true,'autoLangToFont'=>true,'mgl'=>15,
'mgr'=>15,'mgt'=>16,'mgb'=>16,'mgh'=>9,'mgf'=>9, 'orientation'=>'P']);