PHPackages                             tecnickcom/tcpdf - 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. tecnickcom/tcpdf

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

tecnickcom/tcpdf
================

TCPDF is a PHP class for generating PDF documents and barcodes.

6.11.2(2mo ago)4.5k101.8M—1.6%1.6k[361 issues](https://github.com/tecnickcom/TCPDF/issues)[11 PRs](https://github.com/tecnickcom/TCPDF/pulls)20LGPL-3.0-or-laterPHPPHP &gt;=7.1.0CI passing

Since May 10Pushed 2w ago178 watchersCompare

[ Source](https://github.com/tecnickcom/TCPDF)[ Packagist](https://packagist.org/packages/tecnickcom/tcpdf)[ Docs](http://www.tcpdf.org/)[ Fund](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ)[ RSS](/packages/tecnickcom-tcpdf/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (144)Used By (20)Security (8)

TCPDF
=====

[](#tcpdf)

> Legacy PDF engine for PHP. **Deprecated** and maintained for existing integrations.

[![Latest Stable Version](https://camo.githubusercontent.com/162bd8044bed137eb1fef6df68cfa61bac15a202b28066e19c578cb15dcd67f4/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74637064662f76657273696f6e)](https://packagist.org/packages/tecnickcom/tcpdf)[![License](https://camo.githubusercontent.com/77613d028ee34d19c15bf58f31b23353bdda0840d50596e497903dd51751927c/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74637064662f6c6963656e7365)](https://packagist.org/packages/tecnickcom/tcpdf)[![Downloads](https://camo.githubusercontent.com/54d930f1b82632f96849cce0188f755616373be8c6d6f349c4f399b22c0c05ef/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74637064662f646f776e6c6f616473)](https://packagist.org/packages/tecnickcom/tcpdf)[![Donate via PayPal](https://camo.githubusercontent.com/e5f561f4f549822da3fbfb75d0be9059a60eac15b1ff7af66500ca1dd4dba91b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f6e6174652d70617970616c2d3837636565622e737667)](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ)

If TCPDF helps your business, please consider supporting development via [PayPal](https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ).

---

Deprecation Notice
------------------

[](#deprecation-notice)

TCPDF is **deprecated** and in **maintenance-only mode**.

Active feature development has moved to [tc-lib-pdf](https://github.com/tecnickcom/tc-lib-pdf), the modern and modular successor.

For new projects, use `tecnickcom/tc-lib-pdf`. This repository remains available for legacy systems and critical compatibility fixes.

### Migration Path

[](#migration-path)

- New projects: install `tecnickcom/tc-lib-pdf`.
- Existing TCPDF users: keep TCPDF for current production workloads and migrate in phases.
- Teams seeking modern architecture, Composer-first design, and stronger type-safety should prioritize `tc-lib-pdf`.

### Why Migrate to tc-lib-pdf

[](#why-migrate-to-tc-lib-pdf)

- Modern architecture: modular libraries and cleaner component boundaries improve maintainability.
- Better extensibility: new features are easier to add without patching a monolithic legacy core.
- Stronger tooling fit: modern package structure works better with static analysis, CI, and automated tests.
- Lower long-term risk: reduces technical debt tied to legacy APIs and supports ongoing PHP ecosystem evolution.
- Improved delivery speed: teams can implement and ship new PDF capabilities with less friction.

Migration still requires planning and regression checks to preserve rendering parity for existing documents.

### Future Compatibility Possibility

[](#future-compatibility-possibility)

As a long-term possibility, TCPDF could be refactored to use `tc-lib-pdf` internally as a backend while preserving a practical level of backward compatibility for existing TCPDF integrations.

This is not part of a committed roadmap and there is no guarantee it will happen. It is documented here only as a potential direction that may be evaluated in the future.

---

Overview
--------

[](#overview)

TCPDF is a pure-PHP library for generating PDF documents and barcodes directly in application code.

It has been widely used across many PHP stacks and still provides a complete feature set for text rendering, page composition, graphics, signatures, forms, and standards-oriented output.

**Package**`tecnickcom/tcpdf`**Author**Nicola Asuni **License**[GNU LGPL v3](https://www.gnu.org/copyleft/lesser.html) (see [LICENSE.TXT](LICENSE.TXT))**Website****Source**---

Features
--------

[](#features)

### Text &amp; Fonts

[](#text--fonts)

- UTF-8 Unicode and right-to-left (RTL) language support
- TrueTypeUnicode, OpenTypeUnicode v1, TrueType, OpenType v1, Type1, and CID-0 fonts
- Font subsetting
- Text hyphenation, stretching, spacing, and rendering modes (fill/stroke/clipping)
- Automatic line breaks, page breaks, and justification

### Layout &amp; Content

[](#layout--content)

- Standard and custom page formats, margins, and measurement units
- XHTML + CSS rendering, JavaScript, and forms
- Automatic headers and footers
- Multi-column mode and no-write page regions
- Bookmarks, named destinations, and table of contents
- Automatic page numbering, page groups, move/delete pages, and undo transactions

### Images, Graphics &amp; Color

[](#images-graphics--color)

- Native JPEG, PNG, and SVG support
- Geometric drawing primitives and transformations
- Support for GD image formats (`GD`, `GD2`, `GD2PART`, `GIF`, `JPEG`, `PNG`, `BMP`, `XBM`, `XPM`)
- Additional formats via ImageMagick (when available)
- JPEG/PNG ICC profiles, grayscale/RGB/CMYK/spot colors, and transparencies

### Security, Standards &amp; Advanced Output

[](#security-standards--advanced-output)

- Encryption up to 256-bit and digital signature certifications
- PDF annotations (links, text, and file attachments)
- 1D and 2D barcode support (including CODE 128, EAN/UPC, Datamatrix, QR Code, PDF417)
- XObject templates and layers with object visibility controls
- PDF/A-1b support

---

Requirements
------------

[](#requirements)

- PHP 7.1 or later
- `ext-curl`

Optional extensions for richer output in some workflows: `gd`, `zlib`, `imagick`.

---

Third-Party Fonts
-----------------

[](#third-party-fonts)

This library may include third-party font files released under different licenses.

PHP metadata files under [fonts](fonts) are covered by the TCPDF license (GNU LGPL v3). They contain font metadata and can also be generated using TCPDF font utilities.

Original binary TTF files are renamed for compatibility and compressed with PHP `gzcompress` (the `.z` format).

PrefixSourceLicense`free*`[GNU FreeFont](https://www.gnu.org/software/freefont/)GNU GPL v3`pdfa*`Derived from GNU FreeFontGNU GPL v3`dejavu*`[DejaVu Fonts](http://dejavu-fonts.org)Bitstream/DejaVu terms`ae*`[Arabeyes.org](http://projects.arabeyes.org/)GNU GPL v2For full details, see the bundled notices in the corresponding subdirectories under [fonts](fonts).

---

ICC Profile
-----------

[](#icc-profile)

TCPDF includes `sRGB.icc` from the Debian [`icc-profiles-free`](https://packages.debian.org/source/stable/icc-profiles-free) package.

---

Contact
-------

[](#contact)

Nicola Asuni

###  Health Score

80

—

ExcellentBetter than 100% of packages

Maintenance90

Actively maintained with recent releases

Popularity85

Widely adopted with strong download metrics

Community62

Healthy contributor diversity

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 79.3% 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.

###  Release Activity

Cadence

Every ~33 days

Recently: every ~69 days

Total

143

Last Release

77d ago

PHP version history (3 changes)6.0.013PHP &gt;=5.3.0

6.7.4PHP &gt;=5.5.0

6.8.0PHP &gt;=7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f8ee10615840cb28715139809c13ec322d1ccd902506b090469702e5b9d7b88e?d=identicon)[nicolaasuni](/maintainers/nicolaasuni)

---

Top Contributors

[![nicolaasuni](https://avatars.githubusercontent.com/u/1186996?v=4)](https://github.com/nicolaasuni "nicolaasuni (356 commits)")[![williamdes](https://avatars.githubusercontent.com/u/7784660?v=4)](https://github.com/williamdes "williamdes (17 commits)")[![rvanginneken](https://avatars.githubusercontent.com/u/2691312?v=4)](https://github.com/rvanginneken "rvanginneken (5 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (5 commits)")[![mvorisek](https://avatars.githubusercontent.com/u/2228672?v=4)](https://github.com/mvorisek "mvorisek (4 commits)")[![NiklasBr](https://avatars.githubusercontent.com/u/279826?v=4)](https://github.com/NiklasBr "NiklasBr (4 commits)")[![DominiqueFERET](https://avatars.githubusercontent.com/u/7206135?v=4)](https://github.com/DominiqueFERET "DominiqueFERET (4 commits)")[![cedric-anne](https://avatars.githubusercontent.com/u/33253653?v=4)](https://github.com/cedric-anne "cedric-anne (4 commits)")[![nicolaasuni-vonage](https://avatars.githubusercontent.com/u/113166816?v=4)](https://github.com/nicolaasuni-vonage "nicolaasuni-vonage (3 commits)")[![tmbenhura](https://avatars.githubusercontent.com/u/15052407?v=4)](https://github.com/tmbenhura "tmbenhura (3 commits)")[![Jakuje](https://avatars.githubusercontent.com/u/2694489?v=4)](https://github.com/Jakuje "Jakuje (3 commits)")[![kristof-ringleff](https://avatars.githubusercontent.com/u/47804013?v=4)](https://github.com/kristof-ringleff "kristof-ringleff (3 commits)")[![leofeyer](https://avatars.githubusercontent.com/u/1192057?v=4)](https://github.com/leofeyer "leofeyer (3 commits)")[![defrance](https://avatars.githubusercontent.com/u/1179011?v=4)](https://github.com/defrance "defrance (3 commits)")[![ondrej-vipo](https://avatars.githubusercontent.com/u/57705534?v=4)](https://github.com/ondrej-vipo "ondrej-vipo (3 commits)")[![baptistepillot](https://avatars.githubusercontent.com/u/3451236?v=4)](https://github.com/baptistepillot "baptistepillot (2 commits)")[![deguif](https://avatars.githubusercontent.com/u/993399?v=4)](https://github.com/deguif "deguif (2 commits)")[![Findus23](https://avatars.githubusercontent.com/u/6266037?v=4)](https://github.com/Findus23 "Findus23 (2 commits)")[![gemal](https://avatars.githubusercontent.com/u/69105?v=4)](https://github.com/gemal "gemal (2 commits)")[![jausions](https://avatars.githubusercontent.com/u/271436?v=4)](https://github.com/jausions "jausions (2 commits)")

---

Tags

pdfpdf-generationqrcodepdfTCPDFPDFD32000-2008datamatrixpdf417barcodes

### Embed Badge

![Health badge](/badges/tecnickcom-tcpdf/health.svg)

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

PHPackages © 2026

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