mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 23:29:31 +01:00
30 lines
1.0 KiB
Plaintext
30 lines
1.0 KiB
Plaintext
|
The FPDF library is made up of the following elements:
|
||
|
|
||
|
- the main file, fpdf.php, which contains the class
|
||
|
- the font metric files (located in the font directory of this archive)
|
||
|
|
||
|
The metric files are necessary as soon as you want to output text in a document.
|
||
|
They can be accessed from three different locations:
|
||
|
|
||
|
- the current directory (the one where the running script lies)
|
||
|
- one of the directories defined by the include_path parameter
|
||
|
- the directory defined by the FPDF_FONTPATH constant
|
||
|
|
||
|
Here is an example for the last case (note the mandatory final slash):
|
||
|
|
||
|
define('FPDF_FONTPATH','/home/www/font/');
|
||
|
require('fpdf.php');
|
||
|
|
||
|
If the files are not accessible, the SetFont() method will produce the following error:
|
||
|
|
||
|
FPDF error: Could not include font metric file
|
||
|
|
||
|
If so, check if you have correctly defined the constant.
|
||
|
|
||
|
Remarks:
|
||
|
|
||
|
- You can also define FPDF_FONTPATH directly at the beginning of fpdf.php
|
||
|
- Only the files corresponding to the fonts actually used are necessary
|
||
|
|
||
|
The tutorials provided in this package are ready to be executed.
|