diff --git a/action.php b/action.php
index 1b665733..30ac1758 100644
--- a/action.php
+++ b/action.php
@@ -467,6 +467,10 @@ protected function generatePDF($cachefile, $event)
$mpdf->showWatermarkText = true;
}
+ if ($this->getExportConfig('useSubstitutions')) {
+ $mpdf->useSubstitutions = true;
+ }
+
// load the template
$template = $this->loadTemplate();
@@ -1030,6 +1034,8 @@ protected function loadExportConfig()
$this->exportConfig['template'] = $tpl;
$this->exportConfig['isDebug'] = $conf['allowdebug'] && $INPUT->has('debughtml');
+
+ $this->exportConfig['useSubstitutions'] = $this->getConf('useSubstitutions');
}
/**
@@ -1095,6 +1101,7 @@ public function addsvgbutton(Event $event)
}
array_splice($event->data['items'], -1, 0, [new MenuItem()]);
+ //array_splice($event->data['items'], -1, 0, [new MenuItemNS()]);
}
/**
diff --git a/conf/default.php b/conf/default.php
index 77aae8d1..29e986ff 100644
--- a/conf/default.php
+++ b/conf/default.php
@@ -14,3 +14,4 @@
$conf['usestyles'] = 'wrap,';
$conf['qrcodescale'] = '1';
$conf['showexportbutton'] = 1;
+$conf['useSubstitutions'] = 0;
diff --git a/conf/metadata.php b/conf/metadata.php
index 321242f0..3c325f0d 100644
--- a/conf/metadata.php
+++ b/conf/metadata.php
@@ -14,3 +14,4 @@
$meta['usestyles'] = array('string');
$meta['qrcodescale'] = array('string', '_pattern' => '/^(|\d+(\.\d+)?)$/');
$meta['showexportbutton'] = array('onoff');
+$meta['useSubstitutions'] = array('onoff');
diff --git a/lang/en/settings.php b/lang/en/settings.php
index facc067c..260c5813 100644
--- a/lang/en/settings.php
+++ b/lang/en/settings.php
@@ -24,3 +24,4 @@
$lang['usestyles'] = 'You can give a comma separated list of plugins of which the style.css or screen.css should be used for PDF generation. By default only print.css and pdf.css are used.';
$lang['qrcodescale'] = 'Size scaling of the embedded QR code. Empty or 0 to disable.';
$lang['showexportbutton'] = 'Show PDF export button (only when supported by your template)';
+$lang['useSubstitutions'] = 'Substitute missing characters in UTF-8(multibyte) documents - from other fonts';
diff --git a/lang/zh/settings.php b/lang/zh/settings.php
index da0095d7..1b2548bc 100644
--- a/lang/zh/settings.php
+++ b/lang/zh/settings.php
@@ -25,3 +25,4 @@
$lang['usecache'] = '开启 PDF 文件缓存?内嵌的图片将不会受 ACL 权限限制。如果你担心安全问题,请将其禁用。';
$lang['usestyles'] = 'PDF 生成过程中的 style.css 或者 screen.css ,以英文逗号,分割。默认只有print.css 和 pdf.css 被使用。';
$lang['showexportbutton'] = '显示导出 PDF 按钮。(只有在模版支持并在白名单里的时候才能使用)';
+$lang['useSubstitutions'] = '从其他字体寻找并使用UTF-8(多字节)文档中丢失的字符';