FPDI - Import existing PDF documents into FPDF
FPDI - Import existing PDF documents into FPDF
FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates inFPDF, which was developed by Olivier Plathey. Apart from a copy of FPDF, FPDI does not require any special PHP extensions.
Since version 1.2.1, FPDI only supports the 1.6 version of FPDF.
As of version 1.2.1 FPDI can also be used with TCPDF.
FPDI is developed by Setasign - Jan Slabon - and is published under the Apache Software License, Version 2.0.
The usage is very easy: open the document, put a page into a template, and use it like an image!
1 | <?php |
2 | require_once('fpdf.php'); |
3 | require_once('fpdi.php'); |
4 | |
5 | $pdf =& new FPDI(); |
6 | |
7 | $pagecount = $pdf->setSourceFile('TestDoc.pdf'); |
8 | $tplidx = $pdf->importPage(1, '/MediaBox'); |
9 | |
10 | $pdf->addPage(); |
11 | $pdf->useTemplate($tplidx, 10, 10, 90); |
12 | |
13 | $pdf->Output('newpdf.pdf', 'D'); |
view plain | print | ? | RUN |
FPDI - Downloads
FPDI requires FPDF_TPL - so you should download both
packages. Notice the compatibility information!
New FPDI PDF-Parser is available!
Download FPDIFPDI
Versions / Downloads:
Version 1.4 (Release date: 2010-11-12)
Filename | Download |
---|---|
FPDI-1.4.zip | zip tgz tar |
Show older versions
FPDF_TPL
Versions / Downloads:
Version 1.2 (Release date: 2010-11-12)
Filename | Download |
---|---|
FPDF_TPL-1.2.zip | zip tgz tar |
Show older versions