0

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

4

2 回答 2

1

我遇到了同样的问题。

原因原来是我将字体代码从记事本复制到手动创建的 php 文件中(例如手动创建的 helvetica.php)。

过了一会儿,我决定显式地导入文件(eclipse->file->import)。之后错误消失了。这可能是一个权限问题。

希望这可以帮助某人。

于 2013-03-08T11:59:21.470 回答
0

我解决了在 php 字体文件中添加(例如:)opensans-regular.php,在底部添加以下行:

$fpdf_charwidths['opensans-regular']=$cw;
于 2016-09-27T14:01:04.117 回答