keun e44d9e9062 Ajout des fichiers "vendor" | 8年前 | |
---|---|---|
.. | ||
filters | 8年前 | |
LICENSE | 8年前 | |
README.md | 8年前 | |
composer.json | 8年前 | |
fpdf_tpl.php | 8年前 | |
fpdi.php | 8年前 | |
fpdi_bridge.php | 8年前 | |
fpdi_pdf_parser.php | 8年前 | |
pdf_context.php | 8年前 | |
pdf_parser.php | 8年前 |
A clone of FPDI for GitHub/Composer.
FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF, which was developed by Olivier Plathey. Apart from a copy of FPDF, FPDI does not require any special PHP extensions.
FPDI is an add-on for FPDF. Additionally FPDI can be used with TCPDF. For completion we added a FPDF repository which simply clones the offical releases.
This package comes without any dependency configuration in the composer.json file. It’s up to you to load the desired package as described below.
A basic installation via Composer could be done this way:
$ composer require setasign/fpdi:1.6.1
or you can include the following in your composer.json file:
{
"require": {
"setasign/fpdi": "1.6.1"
}
}
To load dependencies automatically we prepared kind of metadata packages. To use FPDI with FPDF use this package:
{
"require": {
"setasign/fpdi-fpdf": "1.6.1"
}
}
For TCPDF use this:
{
"require": {
"setasign/fpdi-tcpdf": "1.6.1"
}
}
To support both FPDF and TCPDF its up to you to load the preferred package before the classes of FPDI are loaded. By default FPDI will extend FPDF. If the TCPDF class exists, a new FPDF class will be created which will extend TCPDF while FPDI will extend this.
To use FPDI with FPDF include following in your composer.json file:
{
"require": {
"setasign/fpdf": "1.8",
"setasign/fpdi": "1.6.1"
}
}
If you are using TCPDF, your have to update your composer.json respectively to:
{
"require": {
"tecnickcom/tcpdf": "6.2.12",
"setasign/fpdi": "1.6.1"
}
}
Additionally you have to trigger composers autoloader for the TCPDF class before you are initiating FPDI:
class_exists('TCPDF', true); // trigger Composers autoloader to load the TCPDF class
$pdf = new FPDI();