I try to create pdf file using tFPDF with custom font.
I put arial font inside font/unifont folder.
I use this code to create pdf file:
$pdf->AddFont('arialbd','','arialbd.ttf',true);
$pdf->SetFont('arialbd','',16);
$pdf->Cell(40,6, 'OÜ Kersti Võlu Koolituskeskus', 0, 1);
$pdf->SetFont('arialbd','',10);
$pdf->Cell(40,12,'REGISTREERIMISLEHT', 0, 1);
$pdf->Output('test.pdf', 'I');
It works well on localhost, but when I uploaded this file on server, it shows me an error:
Waing: fopen(C:xampphtdocskoolituswp-contentpluginskoolitusfpdf/font/unifont/arialbd.ttf)
I see that library tries to load a font from my localhost, but I don't even set a path, just use font name
How to add fonts properly?
