statikbe/laravel-puppeteer-pdf-converter
A Laravel package that converts Blade views or HTML into PDFs using Puppeteer and headless Chrome. It provides a simple API for generating PDFs from templates or URLs, with configurable options for page size, margins, headers, and more.
Adopt when most of the following hold:
Look elsewhere when:
For executives: We can ship PDF output for invoices, statements, and reports using the templates and design system we already have, without signing a per-document vendor contract or sending customer data to a third party. The trade-off is operational: it requires a headless-browser runtime in our infrastructure, so the real cost is a modest amount of platform engineering, not licensing. It is open source and self-hosted, which limits lock-in — the renderer sits behind our own abstraction and can be replaced with a hosted API later if volume or reliability demands it.
For engineering: A thin Laravel wrapper around Puppeteer via Browsershot. Configuration-driven, queue-friendly, and — as of v1.4.1 — passing PHPStan, which suggests reasonable internal type discipline. The v1.4.1 patch fixes body-rendering functions and cleans up static analysis; it is a drop-in upgrade with no breaking changes. Key constraints to design around: run generation on a queue worker with its own container image (Node + Chrome), cap concurrency and memory, set explicit render timeouts, and wrap the package in our own service class so the underlying driver is an implementation detail rather than a dependency spread across the codebase.
How can I help you explore Laravel packages today?