From 3fb04227a5a02d13b998e73ca78894c6cf193228 Mon Sep 17 00:00:00 2001 From: JediKev <kevin@enhancesoft.com> Date: Tue, 21 Aug 2018 14:31:42 -0500 Subject: [PATCH] issue: mPDF SetAutoFont RTL This addresses an issue where `SetAutoFont()` was making the Thai PDFs break. This adds the `AUTOFONT_RTL` flag to only autodetect RTL languages and nothing else. --- include/class.pdf.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/class.pdf.php b/include/class.pdf.php index 39f47a80b..d5ba67f1d 100644 --- a/include/class.pdf.php +++ b/include/class.pdf.php @@ -86,7 +86,7 @@ class Ticket2PDF extends mPDFWithLocalImages return; $html = ob_get_clean(); - $this->SetAutoFont(); + $this->SetAutoFont(AUTOFONT_RTL); $this->WriteHtml($html, 0, true, true); } } @@ -116,7 +116,7 @@ class Task2PDF extends mPDFWithLocalImages { ob_start(); include STAFFINC_DIR.'templates/task-print.tmpl.php'; $html = ob_get_clean(); - $this->SetAutoFont(); + $this->SetAutoFont(AUTOFONT_RTL); $this->WriteHtml($html, 0, true, true); } -- GitLab