Skip to content

Thank You - and the Future of TCPDF #867

@nicolaasuni

Description

@nicolaasuni

First and foremost, a heartfelt thank you to every contributor who has opened a pull request, filed an issue, or taken the time to improve TCPDF. Your generosity, patience, and expertise have kept this library alive and useful for hundreds of thousands of projects around the world. It truly means a lot, and none of this would have been possible without you.

TCPDF 6 is now deprecated

After more than two decades of active development, TCPDF 6 is now considered deprecated. The library still works, but it was designed for a very different era of PHP and PDF generation. The internal architecture has grown organically over the years into a single, monolithic file of roughly 30 000 lines that is extremely hard to test, maintain, or extend safely. No further changes will be merged.

The successor: tc-lib-pdf

The modern replacement is tc-lib-pdf, a ground-up rewrite of the same functionality designed with modern PHP in mind.

It is object-oriented and PSR-compliant. Each subsystem (color, barcode, font, unicode, graphics, etc.) lives in its own Composer package. Every package is covered by unit tests and PHPStan static analysis, with continuous validation in CI. All legacy TCPDF features are supported and new capabilities that were not feasible in the monolithic design, such as better font subsetting, improved HTML/CSS layout, cleaner page-box and prepress support, structured tree tagging, PDF import, and advanced digital signatures with timestamps, are already available. Migration documentation and a growing set of examples (E000-E066+) are included in the repository.

A future TCPDF 7 major version

I am also planning a new TCPDF major release that will keep the familiar TCPDF class API as a thin compatibility wrapper, but delegate all the real work to tc-lib-pdf internally. This would let existing projects continue to use TCPDF with minimal or no code changes while benefiting from the modern backend. Some early work-in-progress is already visible in the modernize branch.

This is a non-trivial undertaking: the legacy public API has hundreds of methods with complex, often overlapping semantics; many internal side-effects (font stack state, coordinate transformations, template scoping, etc.) are tightly coupled in ways that have no clean direct equivalent in tc-lib-pdf; and every edge case of the old rendering pipeline needs to be validated against the new backend. If you have the flexibility to do so, migrating directly to tc-lib-pdf is strongly recommended rather than waiting for the compatibility shim.

What to do with issues and PRs

I would warmly encourage you to check whether the issue is already resolved in tc-lib-pdf and, if not, to open a PR or issue there. If you need help translating your fix to the new library, please open a discussion and I will do my best to guide you.

Thank you again for your time and your continued support.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions