使用kartik-v/yii2-mpdf中文相关配置

一:解决中文乱码配置

'autoLangToFont' => true, //这几个配置加上可以显示中文
'autoScriptToLang' => true, //这几个配置加上可以显示中文
'autoVietnamese' => true, //这几个配置加上可以显示中文
'autoArabic' => true, //这几个配置加上可以显示中文

二:中文的标点符号靠近英文数字的时候,中文符号就又会变回小方块问题配置

'useSubstitutions' => true,

配置前:

image.png

配置后:

image.png

你可能感兴趣的:(phppdfmpdf)