Closed klaaskox closed 3 years ago
Problem solved.
I used tcpdf_addfont.php
to convert the font files from the .ttf
file. I copied these files to my resources/fonts
folder, and used this pad in the addFont()
method. The error disappeared when I generated the files again and stored them in the /vendor/tecnickcom/tcpdf/fonts/
folder.
I am experiencing a strange problem.
When generating a PDF file, everything works fine in my local development environment. When running the script on a webserver it returns an error: "TCPDF ERROR: Could not include font definition file: roboto" This custom font is loaded with
addFont
and set withSetFont('roboto', '', 10, '', true);
This error only pops up when I use HTML tags in a string parameter in the
writeHTMLCell
methodSo writing
$string='test';
works fine,$string='<b>test</b>';
returns an error.$this::writeHTMLCell(50, 50, 20, 20, $string, 0, 0, 0, true, 'L', true);
What could be the cause of this problem?