Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 18, 2024 via composer

setasign/fpdi v2.5.0

FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.
Package summary
Share
0
issues
1
license
1
MIT
Package created
6 Dec 2012
Version published
28 Sep 2023
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
setasign/fpdi@v2.5.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of setasign/fpdi 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does setasign/fpdi do?

The setasign/fpdi is a collection of PHP classes which allows developers to read pages from existing PDF documents and use them as templates in their PHP applications. It works incredibly well with FPDF and can also be used with TCPDF and tFPDF. This package doesn't have pre-fixed dependencies, allowing you to decide the PDF generation library suitable for your project. FPDI is especially valuable for projects requiring PDF manipulations, such as importing pages from one PDF document and using them in another.

How do you use setasign/fpdi?

To use setasign/fpdi, you first need to include it in your project. This can be done via composer. Depending on whether you use FPDF, TCPDF or tFPDF, you will need to modify the require block in your composer.json file accordingly. For example, to use FPDI with FPDF, your composer.json file should look like this:

{
    "require": {
        "setasign/fpdf": "1.8.*",
        "setasign/fpdi": "^2.0"
    }
}

And for TCPDF or tFPDF, you mist replace setasign/fpdf with tecnickcom/tcpdf or setasign/fpdi respectively. After running composer install, you can use FPDI in your code. Here's an example of how to import a page from an existing PDF and use it in a new document:

use setasign\Fpdi\Fpdi;

// setup the autoload function
require_once('vendor/autoload.php');

// initiate FPDI
$pdf = new Fpdi();

// add a page
$pdf->AddPage();

// set the source file
$pdf->setSourceFile("ExistingDocument.pdf");

// import page 1
$tplId = $pdf->importPage(1);

// use the imported page and place it at the coordinates 10,10 with a width of 100 mm
$pdf->useTemplate($tplId, 10, 10, 100);

$pdf->Output();

Where are the setasign/fpdi docs?

Complete documentation for setasign/fpdi is available at the following URL: https://manuals.setasign.com/fpdi-manual/. The documentation provides in-depth insights and details about the FPDI package, helping you configure it to suit your project needs. For more details on getting started, using and integrating setasign/fpdi into PHP applications, refer to this documentation.