mkebza/wk-pdf-bundle
A Laravel/PHP bundle that integrates wkhtmltopdf for generating PDFs from HTML views, giving you a simple wrapper to render templates, configure binary paths and options, and stream or save documents from your application.
wkhtmltopdf binary. The real buy decision is the binary and its operational profile (native dependency, font packs, headless rendering, sandboxing), not this wrapper. Expect to build the wrapper yourself in under a day; budget the decision around the engine.WkPdfBundle). In Laravel you would either pull in the Symfony bundle machinery, re-implement the ~single-service glue natively, or use a Laravel-native alternative. This materially changes the "buy" calculus toward "don't."wkhtmltopdf runs on an old QtWebKit fork — no CSS Grid, partial/fragile Flexbox, no modern JS. Any roadmap item that assumes "designers hand us a web page and we print it" is not supported here.Consider it only if all of the following hold:
-webkit- print quirks, header/footer via --header-html). Rewriting them for a Chrome-based renderer is a real, quantified cost you've decided to defer.Look elsewhere if:
spatie/laravel-pdf (Browsershot/headless Chrome), barryvdh/laravel-dompdf for simple documents, or knplabs/knp-snappy / laravel-snappy if you specifically need the wkhtmltopdf engine with a maintained, widely-adopted wrapper (orders of magnitude more dependents).wkhtmltopdf forks a heavy process per document. Gotenberg (HTTP-based, containerized) is the better operational shape for that.For executives — the one-line version: "We looked at a small open-source PDF-rendering wrapper for our document features. It's a thin convenience layer over a legacy rendering engine, it's built for Symfony rather than our stack, and it has a single maintainer and no adoption. Recommendation: adopt the capability, not the package."
The decision: PDF output (invoices, statements, customer reports) is a real product need with a long tail. The rendering engine choice is the durable decision; the wrapper is a commodity. We should standardize on a headless-Chrome-based renderer (via a maintained Laravel package or a Gotenberg service) so that product and design can ship document templates using the same CSS and component library as the web app, rather than maintaining a parallel print-only design system.
Why not this package: it targets Symfony, it has zero downstream users, and its last release was September 2023. The code it saves us is roughly a day of work; the risk it introduces — an unmaintained dependency on an unmaintained engine, pinned to a native binary — is disproportionate to that saving.
The cost we're accepting: headless Chrome is heavier per render (memory, cold-start). We mitigate with a warm container and a small render queue. For a moderate document volume this is a rounding error against the engineering cost of maintaining print-specific templates.
Ask: approve the engine direction (headless Chrome / Gotenberg) and a small spike to benchmark render latency and memory at our expected peak volume before we commit the template migration to the roadmap.
How can I help you explore Laravel packages today?