Skip to content
Browse files

issue: PDF Squares Instead Of Text

This addresses an issue with Thai fonts (and a few others like Hebrew,
Arabic, etc.) where printing a PDF will show square characters instead of
the actual content. This is due to `autoScriptToLang` and `autoLangToFont`
not being set to `TRUE`. This updates the mPDF config to set the value of
`autoScriptToLang` to `TRUE` as this formats the HTML using the lang
attribute for the specific language of the content. In addition, this
updates the mPDF config to set `autoLangToFont` to `TRUE` as this selects
the correct font to use for the specific language of the content.
  • Loading branch information...
JediKev committed Jul 10, 2019
1 parent b0b2dbf commit 69c5095890717acc4dc84ac9c12bf529b22296fd
Showing with 2 additions and 2 deletions.
  1. +2 −2 include/mpdf/vendor/mpdf/mpdf/src/Config/ConfigVariables.php
@@ -93,12 +93,12 @@ public function __construct()
// Based on script and/or language
// mPDF 6.0 (similar to previously using function SetAutoFont() )
'autoScriptToLang' => false,
'autoScriptToLang' => true,
'baseScript' => Ucdn::SCRIPT_LATIN,
'autoVietnamese' => true,
'autoArabic' => true,
// mPDF 6.0 (similar to old useLang)
'autoLangToFont' => false,
'autoLangToFont' => true,
// Substitute missing characters in UTF-8(multibyte) documents - from other fonts
'useSubstitutions' => false,

0 comments on commit 69c5095

Please sign in to comment.
You can’t perform that action at this time.