Coming from mPDF
Migrating from mPDF
Keep the write-HTML workflow; gain the PDF 2.0 feature set.
If you render HTML to PDF with mPDF, NextPDF offers the same write-HTML workflow on a PDF 2.0 engine — and adds tagged accessibility, PAdES signatures, and PDF/A archival on the same engine.
Before / after
What your code looks like
mPDF-style write-HTML
use Mpdf\Mpdf;
$mpdf = new Mpdf();
$mpdf->WriteHTML($html);
$mpdf->Output('out.pdf', 'F');NextPDF
use NextPDF\Core\Document;
$doc = Document::createStandalone();
$doc->addPage();
$doc->writeHtml($html);
$doc->save('out.pdf');Honest assessment
What changes, and what doesn't
Stays the same
- The render-HTML-to-PDF workflow is the same shape
- Page setup and document metadata map to NextPDF’s API
Gets better
- A PDF 2.0 engine with tagging, signing, and archival
- Worker-safe for Octane / FrankenPHP / RoadRunner
Needs attention
- Review any CSS or custom tags specific to your previous renderer
Effort: A guided rewrite: swap the writer, then validate your templates render as expected.
What you gain
Why the move is worth it
- NextPDF's PDF 2.0 (ISO 32000-2) engine
- Tagged output for accessibility (targeting PDF/UA)
- PAdES B-B signing in Core; B-T in Pro; B-LT/B-LTA in Enterprise
- Strict types, PHPStan Level 10, and active maintenance