Commit 3551a7c4 authored by Thomas Löffler's avatar Thomas Löffler

Add fileadmin/template/css/fonts to the font dir in mpdf

parent 1f9629dd
......@@ -29,9 +29,19 @@ class PdfController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
}
@include_once 'phar://' . ExtensionManagementUtility::extPath('pdf_connector') . 'Libraries/mpdf.phar/vendor/autoload.php';
$defaultConfig = (new Mpdf\Config\ConfigVariables())->getDefaults();
$fontDirs = $defaultConfig['fontDir'];
$mpdf = new \Mpdf\Mpdf(
[
'tempDir' => PATH_site . '/typo3temp/var/',
'fontDir' => array_merge(
$fontDirs,
[
PATH_site . '/fileadmin/template/css/fonts',
]
),
'default_font' => 'FreeSans'
]
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment