knplabs/knp-snappy
Snappy is a PHP wrapper for wkhtmltopdf/wkhtmltoimage to generate PDFs, thumbnails, and snapshots from URLs or HTML. Supports Linux/macOS/Windows, configurable binaries and options, and integrates with Symfony and Laravel via community bundles.
wkhtmltoimage) for use cases like:
wkhtmltopdf.wkhtmltopdf) to meet GDPR/enterprise policies.Adopt if:
wkhtmltopdf (e.g., via Docker, AppArmor, or restricted file access).wkhtmltopdf/wkhtmltoimage) and their OS-specific quirks.Look elsewhere if:
wkhtmltopdf’s capabilities.Puppeteer or WeasyPrint may fit better.For Executives:
"This package lets us generate PDFs and images from web content—like invoices, reports, or social media previews—using open-source tools we already host. It’s a cost-effective alternative to paid APIs, with the added benefit of full control over performance and security. For example, we can add a ‘Download as PDF’ button to our user dashboard without relying on third parties. The trade-off is managing a native binary (wkhtmltopdf), but we can mitigate risks by running it in isolated containers."
For Engineers:
*"knp-snappy wraps wkhtmltopdf to generate PDFs/images from URLs or HTML in Laravel. Key perks:
Snappy::getOutput('https://example.com')).barryvdh/laravel-snappy for seamless Symfony-like usage.For Security/Compliance:
*"We’ll mitigate wkhtmltopdf’s risks by:
--enable-local-file-access=false) by default.How can I help you explore Laravel packages today?