nitmedia/wkhtml2pdf
Laravel wrapper around wkhtmltopdf for converting HTML and Blade views into PDF files. Set your binary path and options in config, then generate, stream, or download PDFs through a simple facade, with support for page size, orientation, and other wkhtmltopdf flags.
Consider it when:
wkhtmltopdf binary, fonts, and its system dependencies. Not an ephemeral/serverless runtime.Look elsewhere when:
barryvdh/laravel-snappy (same binary, fresher wrapper), Spatie's Browsershot (headless Chromium), Dompdf/mPDF for simple documents, or a hosted rendering API (Gotenberg, DocRaptor, PDFShift) if the goal is to offload operations entirely.To executives: PDF output is a must-have for our enterprise buyers — invoices, statements, and reports come up in nearly every deal cycle. We can deliver it fast, but the specific library on the table hasn't been updated since 2017, which means no security patches and a growing support burden. My recommendation is a short, time-boxed spike (1–2 weeks) to validate one actively maintained option before we commit. The cost of that spike is far lower than discovering a forced migration mid-quarter.
To engineering: the package is a thin convenience wrapper around the wkhtmltopdf binary. The convenience is the API; the liability is the dependency — an end-of-life rendering engine, a host-level binary install, and no evidence of current PHP/Laravel support. If we do adopt it, isolate it behind our own PdfRenderer interface so the implementation can be swapped without touching callers, and log the migration as known debt from day one.
The ask: a small discovery budget and a decision gate at the end of the spike — adopt, adopt-with-containment, or replace. If we're already running it, the ask flips to a containment plan plus a replacement slot on the roadmap.
How can I help you explore Laravel packages today?