sogevia/fpdi

FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF.

This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.

Maintainers

Package info

github.com/SOGEVIA/FPDI

Homepage

pkg:composer/sogevia/fpdi

Transparency log

Statistics

Installs: 566

Dependents: 0

Suggesters: 0

Stars: 0

1.5.3 2015-05-11 06:16 UTC

This package is not auto-updated.

Last update: 2026-06-10 16:12:35 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

A clone to FPDI

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.

As of version 1.2.1 FPDI can also be used with TCPDF.

Installation

Run the command:

$ composer require "setasign/fpdi"

Usage

The usage is very easy: open the document, put a page into a template, and use it like an image!

<?php
// ...

use \FPDI;
use \FPDF;

// ...
$pdf = new FPDI();

$pageCount = $pdf->setSourceFile("Fantastic-Speaker.pdf");
$tplIdx = $pdf->importPage(1, '/MediaBox');

$pdf->addPage();
$pdf->useTemplate($tplIdx, 10, 10, 90);

$pdf->Output();