# Setasign/FPDI

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

Repository: https://github.com/Setasign/FPDI
Canonical: https://ross.abutalabs.com/products/fpdi
Homepage: https://www.setasign.com/fpdi
Language: PHP
License: MIT
License Family: permissive
Topics: php, pdf, fpdf, fpdi
Last push: 2026-08-24T07:18:13+00:00

## Health v2 (maintenance only)
Score: 91/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 76, longevity 100
- inputs: {"age_days": 4135, "days_push": 9, "days_rel": 83, "gap_med": 59.0, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1248, forks 179 (observed 2026-08-28T04:04:07.712710+00:00)

## What it is
FPDI is a collection of PHP classes that read pages from existing PDF documents and use them as templates in PDF generation libraries like FPDF, TCPDF, and tFPDF. It requires no special PHP extensions beyond Zlib and is distributed under the MIT license.

## Use cases
- import pages from an existing pdf into a new pdf with php
- stamp a watermark or overlay onto existing pdf pages
- merge pages from multiple pdf documents using fpdf
- use a pdf page as a template and add text on top
- extract and reuse single pages from a pdf file in php
- generate invoices that build on an existing pdf letterhead

## When to choose
- you generate PDFs in PHP with FPDF, TCPDF, tFPDF, or mPDF and need to reuse existing PDF pages
- you want a pure-PHP solution with no special extensions beyond Zlib
- you need an MIT-licensed library for PDF page importing

## When to avoid
- you need to edit or fully manipulate existing PDFs (annotations, form fields, bookmarks are lost on import)
- you need to import encrypted or protected PDF documents
- the source PDF uses compression techniques unsupported by the free FPDI parser

## Facets
- artifact type: library
- maturity: stable
- function: pdf, parser, templating
- domain: pdf, files, web-development
- platform: php, cross-platform
- tags: fpdf, tcpdf, pdf-import, page-templates, composer

## Member repositories
- Setasign/FPDI (main) score 91

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:07.712710+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:07:50.330909+00:00, confidence not recorded.
  - readme: https://github.com/Setasign/FPDI (fetched 2026-08-28T04:04:07.712710+00:00, sha 0523afdee209)
  - homepage: https://www.setasign.com/fpdi (fetched 2026-08-29T12:18:53.695128+00:00, sha 654b73abc39c)
  - site_page: https://www.setasign.com/about-us (fetched 2026-08-29T12:18:53.716869+00:00, sha 134a815ac59e)
  - site_page: https://www.setasign.com/about-us/our-clients (fetched 2026-08-29T12:18:53.736470+00:00, sha 1b7e7dd62c56)
  - site_page: https://manuals.setasign.com/fpdi-manual/v2/installation (fetched 2026-08-29T12:18:53.746000+00:00, sha ed1fac717e6b)
  - site_page: https://www.setasign.com/support/faq/fpdi (fetched 2026-08-29T12:18:53.744108+00:00, sha 8c4118fdc68a)
  - site_page: https://www.setasign.com/support/faq (fetched 2026-08-29T12:18:53.704727+00:00, sha 7275381e395d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
