I am using Mpdf v7 to generate a PDF file. This is my config:
$mpdfConfig =
[
'margin_left' => 25,
'margin_right' => 10,
'margin_top' => 20,
'margin_bottom' => 20,
'format' => 'A4-L',
'mode' => 'win-1252',
];
Calling the output to save my pdf throws the following error:
Cannot find TTF TrueType font file "DejaVuSansMono.ttf" in configured font directories.' in /var/www/html/vendor/mpdf/mpdf/src/Fonts/FontFileFinder.php on line 33
I'm using Shopware 5.5.1 and work with the included mpdf library. Calling the pdf with the following code:
$mpdf = new Mpdf($mpdfConfig);
$mpdf->WriteHTML($data);
$mpdf->Output($filename, "D");
Why is the DejaVuSansMono.ttf font not found? I do not use this font. Event with defining the 'default_font' to 'Courier' I get the same error.