PHPackages                             winnerke/tcpdi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. winnerke/tcpdi

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

winnerke/tcpdi
==============

Helper Package for TCPDI

02PHP

Since Oct 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/winnerke/tcpdi)[ Packagist](https://packagist.org/packages/winnerke/tcpdi)[ RSS](/packages/winnerke-tcpdi/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

TCPDI
=====

[](#tcpdi)

Composer ready [TCPDI](https://github.com/pauln/tcpdi).

PDF importer for [TCPDF](http://www.tcpdf.org/), based on [FPDI](http://www.setasign.de/products/pdf-php-solutions/fpdi/). Requires [pauln/tcpdi\_parser](https://github.com/pauln/tcpdi_parser) and [FPDF\_TPL](http://www.setasign.de/products/pdf-php-solutions/fpdi/downloads/)which included in the repository.

Installation
------------

[](#installation)

Link package in composer.json, e.g.

```
{
    "require": {
        "mrpamacs/tcpdi": "dev-master"
    }
}
```

Usage
-----

[](#usage)

Usage is essentially the same as FPDI, except importing TCPDI rather than FPDI. It also has a "setSourceData()" function which accepts raw PDF data, for cases where the file does not reside on disk or is not readable by TCPDI.

```
// Create new PDF document.
$pdf = new TCPDI(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);

// Add a page from a PDF by file path.
$pdf->AddPage();
$pdf->setSourceFile('/path/to/file-to-import.pdf');
$idx = $pdf->importPage(1);
$pdf->useTemplate($idx);

$pdfdata = file_get_contents('/path/to/other-file.pdf'); // Simulate only having raw data available.
$pagecount = $pdf->setSourceData($pdfdata);
for ($i = 1; $i importPage($i);
    $pdf->AddPage();
    $pdf->useTemplate($tplidx);
}
```

TCPDI\_PARSER
=============

[](#tcpdi_parser)

Parser for use with TCPDI, based on TCPDF\_PARSER. Supports PDFs up to v1.7.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/694be9e65fd0b2e61240ca23f18458d0c8a4d5de66601c3d400a03ee8ad3857c?d=identicon)[winnerke](/maintainers/winnerke)

---

Top Contributors

[![winnerke](https://avatars.githubusercontent.com/u/33360923?v=4)](https://github.com/winnerke "winnerke (2 commits)")

### Embed Badge

![Health badge](/badges/winnerke-tcpdi/health.svg)

```
[![Health](https://phpackages.com/badges/winnerke-tcpdi/health.svg)](https://phpackages.com/packages/winnerke-tcpdi)
```

###  Alternatives

[tarfin-labs/easy-pdf

Makes pdf processing easy.

1719.9k](/packages/tarfin-labs-easy-pdf)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
