fruitcake/laravel-weasyprint
Laravel wrapper for WeasyPrint that converts HTML and CSS, including Blade views, into high-quality PDFs. Offers a simple API for generating, saving, and streaming PDFs directly from your Laravel application.
@page margins, page counters, cross-references, print-grade typography) over pixel-parity-with-Chrome.Consider it when:
Look elsewhere when:
On v0.3.3 specifically: this is a patch release correcting a malformed facade alias in composer.json. It is not a breaking change and adds no capability, but it matters for teams relying on Laravel's package auto-discovery to resolve the WeasyPrint facade without manual alias registration — if you had worked around the alias by registering it by hand, verify the workaround doesn't double-register after upgrading. Treat it as routine maintenance: upgrade on your normal patch cadence, and let it reinforce the recommendation to pin ^0.3 and isolate usage behind an internal interface.
For executives (30 seconds): We need PDF output for [invoices/statements/reports]. Instead of building a document engine, we'd adopt a small open-source Laravel component that drives WeasyPrint, a mature HTML-to-PDF renderer. It gives us professional, print-quality documents — correct page numbering, repeating headers, clean page breaks — authored in standard HTML/CSS, so design and content teams work in tools they already know. Cost is low; the main trade-off is that it requires a Python component in our deployment, which our infrastructure can accommodate. The library is early-stage (v0.3.x), so we will pin the version and keep it behind a thin internal wrapper to protect against future changes. Latest patch release is a minor configuration fix, not a functional change — no impact on scope or timeline.
For engineering:
composer.json. If any environment manually registered the alias to work around the bug, remove that workaround when bumping to avoid duplicate registration. Standard patch upgrade otherwise.^0.3, wrap calls in an internal DocumentRenderer interface, and keep templates and CSS in version control alongside the code that renders them. That keeps a future swap to a browser-based renderer a contained change rather than a rewrite.How can I help you explore Laravel packages today?