From TCPDF
Over 112M installs—and a compatibility adapter for selected TCPDF 6.2.13 calls. Most call sites change one import.
TCPDF total installs: 112,272,543 (Packagist “Overall”) · captured 2026-07-27 (opens in a new tab)
Migration hub
Start with the calls you already have. Compare the code, review the compatibility surface, and move each document on your schedule.
TCPDF compatibility
The nextpdf/compat-legacy adapter preserves selected TCPDF 6.2.13 call signatures, including method names, parameter order, and defaults. Most call sites change only their use line.
Your TCPDF code
use TCPDF;
$pdf = new TCPDF('P', 'mm', 'A4');
$pdf->SetFont('helvetica', '', 12);
$pdf->AddPage();
$pdf->writeHTML($html);
$pdf->Output('invoice.pdf', 'F');Compatibility import
// Import the compatibility adapter
use NextPDF\Compat\Tcpdf\TCPDF;
$pdf = new TCPDF('P', 'mm', 'A4');
$pdf->SetFont('helvetica', '', 12);
$pdf->AddPage();
$pdf->writeHTML($html);
$pdf->Output('invoice.pdf', 'F');The adapter delegates 94 of approximately 120 surveyed TCPDF 6.x methods to NextPDF.
Starting points
Over 112M installs—and a compatibility adapter for selected TCPDF 6.2.13 calls. Most call sites change one import.
TCPDF total installs: 112,272,543 (Packagist “Overall”) · captured 2026-07-27 (opens in a new tab)
Map FPDF’s AddPage, SetFont, and Cell calls to NextPDF’s camelCase drawing API.
FPDF AddPage, SetFont, Cell, and Output example · captured 2026-08-05 (opens in a new tab) · FPDF Output reference · captured 2026-08-05 (opens in a new tab)
Map mPDF’s WriteHTML call to NextPDF’s writeHtml API, then validate each template.
mPDF WriteHTML and Output reference · captured 2026-08-05 (opens in a new tab)
Move HTML-to-PDF work into PHP, or use a browser rendering extension.
Snappy wkhtmltopdf wrapper and generateFromHtml example · captured 2026-08-05 (opens in a new tab)