I have bunch of images and I want to generate PDF of of all those images. I am using FPDF
library (version 1.7) for achieving this. But I am getting the following error:
FPDF error: Could not include font definition file
I found some articles on google regarding this error and tried that but still problem persist.
What should be the problem here? Where I am going wrong?
I had a similar error and i share here because there is no documentation online.
"FPDF error: Font file not found"
If you convert a ttf font file for use it in FPDF with the online utility (http://fpdf.fruit-lab.de) once you have downloaded the files you need (file.php, file.afm, file.z) you'll have to:
1) put in font folder (or any other folder, but you should use this instruction define('FPDF_FONTPATH','yourpath/yourfolder/');
)
2) If you RENAME the files, you should open the file.php and search for "$file" which contains the name of the ".z" file and rename it properly.
Maybe a bit too late, but I used to have that same problem and the solution was to simply give permissions to the /font/ folder...
Rookie mistake... 755 permissions did the trick for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With