prezent/dompdf-bundle
A Symfony bundle that integrates the Dompdf library, letting you generate PDFs from HTML and CSS inside your Symfony applications with simple, bundle-style configuration and service access.
Verdict up front: this is the wrong artifact for the stated target. prezent/dompdf-bundle is a Symfony bundle, not a Laravel package. Its entire value proposition is registering dompdf/dompdf as a service in Symfony's DI container and exposing bundle configuration. In a Laravel context that value is approximately zero — Laravel has no bundle registration mechanism, so you would be manually instantiating Dompdf yourself, at which point the bundle is dead weight.
dompdf/dompdf itself, which is mature, widely used, and actively maintained. The bundle is a ~2021 thin wrapper. Adopting it means inheriting a wrapper's release cadence for a library you could depend on directly. If the actual stack is Symfony 4/5-era, the bundle is plausible but stale; if it's Laravel 9+, it does not fit at all.$dompdf->loadHtml(), ->render(), ->stream(). There is no integration surface worth the dependency. For Laravel, barryvdh/laravel-dompdf is the de facto standard (facade, config publishing, queue-friendly helpers) and wraps the same engine — this bundle offers no comparable affordance.dompdf advisories through the wrapper.dompdf and Symfony versions that conflict with PHP 8.2/8.3 and current framework majors. Expect composer require resolution work or forced --ignore-platform-reqs hacks.dompdf's CSS support ceiling (flexbox/grid partial or absent, limited font handling, no JS) is the real product risk, not the wrapper — but the wrapper obscures which engine version you're pinned to, making rendering regressions harder to attribute.dompdf the right engine at all, or is the requirement "HTML→PDF" satisfiable by headless Chrome / Gotenberg / wkhtmltopdf, which handle modern CSS and would remove the CSS-support risk class?dompdf degrades sharply on large, table-heavy documents.dompdf nor this bundle provides it)?dompdf/dompdf directly. The only defensible adoption scenario is an existing Symfony application already on this bundle, where removal is a separate cleanup ticket rather than a blocker.PdfRenderer interface with render(HtmlDocument): PdfBinary. Implement it with dompdf directly (or barryvdh/laravel-dompdf in Laravel) behind that interface. This costs roughly half a day and caps exit cost at "swap one class." Given the wrapper is thin and unmaintained, the exit cost is low today; formalize that with the interface so it stays low.
Dompdf, then delete the Composer dependency. Verify the pinned dompdf version is not held back by the bundle's constraints — expect to unlock and re-test rendering output.dompdf release the wrapper's constraint permits. Run a rendering regression suite (visual diffs on 5–10 representative documents) before and after any version unlock. Budget for font installation and a writable temp/cache directory — the most common first-run failure.barryvdh/laravel-dompdf or the engine choice.dompdf and one alternative engine. Compare fidelity, latency, peak memory. This de-risks the CSS-support question cheaply.PdfRenderer interface, direct dompdf adapter, config externalized (font dir, temp dir, paper size, DPI, isRemoteEnabled).dompdf directly and pin it deliberately; budget recurring cost if you keep the bundle, because you will be the one patching its Composer constraints and its Symfony deprecations.dompdf and barryvdh/laravel-dompdf have large, searchable issue corpora — that is a real, quantifiable support-cost delta and the strongest argument against this package.dompdf is a pure-PHP renderer — CPU-bound, memory-hungry, single-document-per-process, no streaming. It does not belong on the request path at volume. Architecture should be: upload/accept request → enqueue job → worker pool sized by peak memory per document class → object storage → signed URL. Concretely, expect 100MB+ peaks on large table documents, and set worker memory_limit with headroom above your P95 document, not your P50. Scaling is horizontal worker count; there is no smarter lever. Font and asset caching on a shared volume materially cuts per-render cost.dompdf upgrades — user-visible, support-ticket-generating, and quiet. Requires a visual-diff gate.dompdf CVEs through this wrapper. This is the failure mode with the worst blast radius.dompdf will and won't render, and ongoing template-debugging cost as document designs evolve. QA needs a visual regression harness, which is the real ramp-up investment. Net: low onboarding cost, moderate-to-high ongoing template maintenance cost — and that cost is identical whether or not this bundle is in the dependency graph, which is precisely why the bundle should not be.How can I help you explore Laravel packages today?