// the find
barryvdh/laravel-snappy
Laravel Snappy PDF
A thin Laravel service provider that wraps KnpLabs/snappy, which itself wraps wkhtmltopdf/wkhtmltoimage. If you need pixel-accurate PDF generation from HTML in a Laravel app and are willing to manage a system binary, this is the established way to do it. 2,755 stars reflects years of being the go-to solution, not any particular technical cleverness.
The PDF fake for testing is genuinely useful — asserting on view names and content without spawning a real binary process is exactly what you want in a test suite. The wrapper API (loadView/loadHTML chaining, inline/download/save) maps cleanly to Laravel idioms. It covers both PDF and image output from the same wkhtmltopdf toolchain. Still receiving updates in 2026 despite wkhtmltopdf itself being essentially abandoned upstream.
wkhtmltopdf is the real dependency here and it's a dead project — the last real release was 2019, it ships a bundled Qt WebKit that is frozen in time, and modern CSS features simply don't render correctly. Deploying this in containers or serverless is painful: you need an amd64 binary, system libraries (libXrender, fonts, libXss), and it doesn't work in read-only filesystems without extra effort. The package itself is ~300 lines of thin glue; if wkhtmltopdf misbehaves you're debugging a C++ binary, not PHP. Chrome-based alternatives (Browsershot, Puppeteer, or Headless Chrome via CDP) render modern HTML/CSS far more accurately and are better maintained.