Reputation: 7735
I'm getting this error in a website I've taken over from someone else:
FPDF error: Could not include font metric file
I have the path to the folder defined with:
define('FPDF_FONTPATH','xxxxx');
I have looked at other answers on Stackoverflow, which suggest that this means the folder or file do not exist. But in this case they do (I'm able to point at them with the web browser).
I would like to include a link here but would rather not for security reasons, unless anyone knows a safe way of doing so?
Any help much appreciated!
Thanks, G
Upvotes: 0
Views: 5290
Reputation: 1
I solved adding in the php font file, (example: opensans-regular.php
), the following line at the bottom:
$fpdf_charwidths['opensans-regular']=$cw;
Upvotes: 0
Reputation: 11
I encountered the same problem.
The cause turned out te be the fact that I copied the fonts code from Notepad into a manually created php file (for instance manually created helvetica.php).
After a while I decided to explicitly import the files (eclipse->file->import). After that the error disappeared. It was probably a permissions problem.
hope this helps someone.
Upvotes: 1