FPDF错误:无法在PHP中包含字体定义文件 [英] FPDF error: Could not include font definition file in PHP

查看:110
本文介绍了FPDF错误:无法在PHP中包含字体定义文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一堆图像,我想生成所有这些图像的PDF.我正在使用FPDF库(1.7版)来实现此目的.但我收到以下错误:

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

我在Google上找到了一些有关此错误的文章,并尝试过但仍然存在问题.

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错误:找不到字体文件"

"FPDF error: Font file not found"

如果您将ttf字体文件转换为使用在线实用程序在FPDF中使用的字体文件( http://fpdf.fruit -lab.de )下载完所需文件(file.php,file.afm,file.z)后 您必须:

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)放在字体文件夹(或其他任何文件夹中,但您应使用此说明define('FPDF_FONTPATH','yourpath/yourfolder/');)

1) put in font folder (or any other folder, but you should use this instruction define('FPDF_FONTPATH','yourpath/yourfolder/');)

2)如果重命名文件,则应打开file.php并搜索包含$ .z文件名的"$ file"并正确重命名.

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.

这篇关于FPDF错误:无法在PHP中包含字体定义文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆