Migration hub
Move to NextPDF, on your terms.
Coming from another PHP PDF library? Here is the honest path to a PDF 2.0 engine — including a drop-in compatibility adapter that turns most TCPDF migrations into a one-line change.
The one-line case
Coming from TCPDF? Change one import.
The nextpdf/compat-legacy adapter keeps TCPDF’s class and method surface, so most call sites change only their use line — then you are on the PDF 2.0 engine.
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');One line changes
use NextPDF\Compat\Tcpdf\TCPDF; // the only change
$pdf = new TCPDF('P', 'mm', 'A4');
$pdf->SetFont('helvetica', '', 12);
$pdf->AddPage();
$pdf->writeHTML($html);
$pdf->Output('invoice.pdf', 'F');Pick your starting point
Per-library migration guides
From TCPDF
Over 109 million installs — and the warmest migration path we offer.
Read the guide →From FPDF
Keep a familiar cell-and-coordinate API; gain HTML, tagging, and signatures.
Read the guide →From mPDF
Keep the write-HTML workflow; gain the PDF 2.0 feature set.
Read the guide →From wkhtmltopdf
Drop the external binary — render in-process, on a maintained engine.
Read the guide →
Migration guides describe your path to NextPDF and what you gain. Where we state a fact about another library, it is sourced and dated; we frame every move as “coming from X”, never as a judgement of the tool you are leaving.