I understood my problem, I was almost there.
Here is a step by step:
First, convert the font using the font of the tcpdf_addfont.php tool to the TCPDF tool folder:
php/tcpdf/tools/tcpdf_addfont.php -i php/font/rumpelstiltskin-webfont.ttf
This will create the necessary files and place them in the TCPDF font folder. Check the font folder and copy the font name, in my case it was rumpelstiltskinwebfont .
In your code, install the font using the font file name and write a line of text:
$pdf->SetFont('rumpelstiltskinwebfont', '', 14, '', false); $pdf->Write(0, 'Fill text', '', 0, '', true, 0, false, false, 0);
What is it. Hope this helps someone. :)
source share