Skip to content

TCPDF-NextThe modern PHP PDF library.

Rebuilt for a new era. PDF 2.0 · PAdES B-LTA · PDF/A-4 · PHP 8.5+ · Laravel 12

TCPDF-Next
213
Source Files
908+
Tests
28,881+
Assertions
Level 8
PHPStan

The Ecosystem

TCPDF-Next is not a single library — it's a modular ecosystem of 4 packages designed to work together.

TCPDF-Next
Core
Artisan
Chrome CDP
Laravel
Framework
Pro
Enterprise
PackageComposerDescription
Coreyeeefang/tcpdf-nextPDF 2.0 generation, typography, barcodes, encryption, PAdES B-B
Artisanyeeefang/tcpdf-nextartisanChrome CDP HTML-to-PDF — full CSS3, Flexbox, Grid, text-selectable output
Laravelyeeefang/tcpdf-nextlaravelServiceProvider, Facade, PdfResponse, queue jobs, Octane-safe
Proyeeefang/tcpdf-nextproPAdES B-T~B-LTA, PDF/A-4, HSM signing, specialty barcodes

Quick Look

5 lines of code to generate a PDF:

php
use Yeeefang\TcpdfNext\Core\Document;

$pdf = Document::create()
    ->setTitle('My First PDF')
    ->addPage()
    ->setFont('Helvetica', '', 14)
    ->cell(0, 10, 'Hello, PDF 2.0!')
    ->save('hello.pdf');

With Laravel:

php
use Yeeefang\TcpdfNext\Laravel\Facades\Pdf;
use Yeeefang\TcpdfNext\Laravel\Http\PdfResponse;

$pdf = Pdf::create()
    ->setTitle("Invoice #{$invoice->number}")
    ->addPage()
    ->setFont('Helvetica', '', 12)
    ->cell(0, 10, "Invoice #{$invoice->number}");

return PdfResponse::inline($pdf, "invoice-{$invoice->number}.pdf");

TCPDF vs TCPDF-Next

FeatureOriginal TCPDFTCPDF-Next
PHP version5.x – 8.x8.5+ only
PDF spec1.4 – 1.72.0 (ISO 32000-2:2020)
ArchitectureSingle ~30K-line class213 files, 26 modules, 12 composable traits
Type safetyNonePHPStan level 8, backed enums, readonly classes
SignaturesBasic PKCS#7PAdES B-B (Core) → B-LTA (Pro)
ArchivalPDF/A-1b (partial)PDF/A-4 (ISO 19005-4:2020)
HTML renderingBuilt-in (limited CSS)Built-in + Chrome CDP (full CSS3)
Testing~50 tests908+ tests, 28,881+ assertions
ExtensibilitySubclass monolithModular ecosystem + extension API
LaravelNoneFull (Facade, Queue, Octane)

Standards Compliance

ISO 32000-2:2020 — PDF 2.0 ISO 19005-4:2020 — PDF/A-4 ETSI EN 319 142-1 — PAdES RFC 3161 — TSA Timestamps RFC 5652 — CMS (PKCS#7) RFC 6960 — OCSP RFC 4013 — SASLprep
StandardCoveragePackage
ISO 32000-2:2020PDF 2.0 — fullCore
ISO 19005-4:2020PDF/A-4, 4e, 4fPro
ETSI EN 319 142-1PAdES B-BCore
ETSI EN 319 142-1PAdES B-T ~ B-LTAPro
RFC 3161TSP (client in Core, doc-timestamp in Pro)Core + Pro
RFC 5652CMS (PKCS#7)Core
RFC 6960OCSPPro
RFC 5280X.509 / CRLPro
RFC 4013SASLprepCore
ISO 18004QR Code (v1-40, ECI, Kanji)Core
ISO 16022DataMatrix (+ DMRE)Core
ISO 15438PDF417Core
ISO 18004 AnnexMicro QR (M1-M4)Pro
ISO 24723DotCodePro
ISO 20830HanXinPro
ISO 23634JAB Code (polychromatic)Pro

Community & Support

Released under the LGPL-3.0-or-later License.