Coming from wkhtmltopdf
Migrating from wkhtmltopdf
Drop the external binary — render in-process, on a maintained engine.
wkhtmltopdf is in limited maintenance, and its underlying Qt 4 / WebKit engine has been unmaintained since 2012–2015. NextPDF renders in your PHP process — no external binary to install and secure — or via the Cloudflare/Chrome extensions when you want a full browser engine.
wkhtmltopdf status: limited maintenance; Qt 4 unsupported since 2015, WebKit since 2012 (verified 2026-06-27, opens in a new tab)
Before / after
What your code looks like
wkhtmltopdf (Snappy)
use Knp\Snappy\Pdf;
$snappy = new Pdf('/usr/bin/wkhtmltopdf');
$snappy->generateFromHtml($html, 'out.pdf');NextPDF (in-process)
use NextPDF\Core\Document;
$doc = Document::createStandalone();
$doc->addPage();
$doc->writeHtml($html); // no binary, no shell-out
$doc->save('out.pdf');Honest assessment
What changes, and what doesn't
Stays the same
- HTML in, PDF out — the same job
Gets better
- In-process: no binary to deploy, sandbox, or keep patched
- A maintained engine with tagging and signatures
- Need a full browser? Use the Artisan (Chrome) or Cloudflare extensions
Needs attention
- Pages that relied on JavaScript execution should use the Chrome/Cloudflare rendering extensions
Effort: A guided rewrite: replace the shell-out with an in-process render, or point at the Chrome/Cloudflare extension for JS-heavy pages.
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