您的当前位置:首页>全部文章>文章详情

mPDF v8 中文乱码问题的修复

发表于:2023-04-06 11:27:13浏览:1199次 TAG: #mpdf 收藏

传入以下参数或者修改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']);

 

Hi 小闻

可以咨询展会的任何问题哦 关闭