Note: DEPRACATED mPDF >= 5.0 See useAdobeCJK
$mpdf->use_CJK_only = true;
Use this if you are using a CJK codepage with only CJK/ASCII or embedded characters -this will prevent loading of Unicode fonts – keeping file size to a minimum
Ignored if not using a CJK codepage.
Default = false
(mPDF >= 5.0)
Description
boolean useAdobeCJK
When TRUE, forces mPDF to use the free Adobe CJK Asian fonts, thus keeping the PDF file size to a minimum. This affects text defines using the CSS lang property, which includes the use of AutoFont. Thus a CSS stylesheet defining lang=”ja” will be substituted by the Adobe Japanes font. (This will not prevent the use of other CJK fonts if specified by font-family.)
The precise effect it has on different languages/fonts will be specified in the config_cp.php configuration file.
Note: This value can only be set inside the config.php configuration file. To change the value at runtime, you must use $mpdf = new mPDF(‘-aCJK’); to set as FALSE or $mpdf = new mPDF(‘+aCJK’); to set as TRUE
Values
useAdobeCJK = TRUE|FALSE
Values
TRUE: DEFAULT Use the free Adobe CJK Asian fonts
FALSE: Use normal embedded fonts
然后修改mpdf/config.php,大致44行,将useAdobeCJK改为true: 1 | $this->useAdobeCJK = true; // Uses Adobe CJK fonts for CJK languages |
之后导出中文正常!
|