开发者

how can get the FPDF library

i have found some pdf file geneartion program in php. When i run it i get the following error Warning:

Warning: include(helveticab.php) [function.include]: failed to open stream: No such file or directory in E:\wamp\www\raj19\fpdf.php on line 789

Warning: include() [fu开发者_运维知识库nction.include]: Failed opening 'helveticab.php' for inclusion (include_path='.;C:\php5\pear') in E:\wamp\www\raj19\fpdf.php on line 789
FPDF error : Could not include font metric file

I think the fpdf.php is missing .I have searched on their site but i could not find the english version. can anyone provide me full link of english version?


helveticab.php is a font definition file, which is shipped with FPDF. Get it here: http://www.fpdf.org/


Since your code is not able to locate font library, add this line to your code.

define('FPDF_FONTPATH','fpdf/font/');


All you have to do is to copy the entire folder, and check for "fonts" one. Go inside and search for the file you're looking for.

If nothing works. Try with $font = 'fonts/arial.ttf'; and in the "fonts" folder put the TTF file. If you don't know where to get it. Search in your explorer "fonts" and get the TTF file by dragging it to the fonts folder or copying it.

If doens't works, copy the code line where you're trying to call the font file.


Depends on where the library is in the root directory. if Is in the same place just use $str = 'fpdf.php'; require($str); if your output is in a directory called fpdf and your php output is in another directory i.e. mydoc, you need to go up one step $str = '../fpdf.php'; if your php output is down 2 steps i.e. root/myfolder/mydoc/output.php then you need to up two steps $str = '../../fpdf/fpdf.php'; i'm assuming that you have your fpdf library in the folder root/fpdf/fpdf.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜