PHPackages                             vbhan/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. vbhan/tcpdi

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

vbhan/tcpdi
===========

TCPDI implementation in php 7+

011PHP

Since May 16Pushed 5y ago1 watchersCompare

[ Source](https://github.com/rssaini/vbhan-tcpdi)[ Packagist](https://packagist.org/packages/vbhan/tcpdi)[ RSS](/packages/vbhan-tcpdi/feed)WikiDiscussions main Synced 1w 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 is included in the repository.

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

[](#installation)

Link package in composer.json, e.g.

```
{
    "require": {
        "vbhan/tcpdi": "^1.0"
    }
}
```

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

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

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/6c490e11f86e3f0c9a6abfb79d84d6afee56a40d3318d24069e1336188676fcf?d=identicon)[er\_rahulsaini](/maintainers/er_rahulsaini)

---

Top Contributors

[![rssaini](https://avatars.githubusercontent.com/u/7877878?v=4)](https://github.com/rssaini "rssaini (1 commits)")

### Embed Badge

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

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

###  Alternatives

[phpoffice/phpspreadsheet

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

13.9k293.5M1.3k](/packages/phpoffice-phpspreadsheet)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M216](/packages/smalot-pdfparser)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M131](/packages/openspout-openspout)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)

PHPackages © 2026

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