Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Dompdf Bundle

Dompdf Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

prezent/dompdf-bundle is a Symfony bundle that integrates Dompdf into your application, letting you generate PDF documents directly from HTML and CSS. It wires the library into Symfony's service container so you can render invoices, reports, or tickets without writing boilerplate setup code.

  • Service integration — Dompdf is exposed as a configurable Symfony service.
  • HTML/CSS rendering — convert templates into print-ready PDFs.
  • Flexible configuration — tune paper size, orientation, and rendering options via bundle config.
  • Twig-friendly workflow — render templates first, then pass the HTML straight to the PDF generator.
Frequently asked questions about Dompdf Bundle
Is prezent/dompdf-bundle a Laravel package?
No. It is a Symfony bundle whose purpose is to register dompdf/dompdf in Symfony's dependency injection container and expose bundle configuration. Laravel has no bundle registration mechanism, so the package provides no usable integration surface in a Laravel application. For Laravel, use barryvdh/laravel-dompdf or depend on dompdf/dompdf directly.
How do I install prezent/dompdf-bundle in Laravel?
You should not. Composer may resolve the dependency, but there is no Laravel service provider, facade, or config publishing for it, so nothing is wired into the framework. Adding it would only create dead weight around dompdf. Use barryvdh/laravel-dompdf instead if you want a Laravel-native wrapper.
What is the Laravel equivalent of prezent/dompdf-bundle?
barryvdh/laravel-dompdf is the de facto standard Laravel wrapper for the same Dompdf engine. It provides a facade, publishable configuration, Blade view rendering helpers, and queue-friendly usage. It is actively maintained and widely used in production Laravel applications.
Is prezent/dompdf-bundle still maintained?
Treat it as unmaintained. Its last release was on 2021-02-12, it has very few stars and zero dependents, which means there is no public field validation of it running in production. There is also no security patch path for underlying dompdf advisories through the wrapper, so you would inherit maintenance risk for very little benefit.
Does prezent/dompdf-bundle support PHP 8.2 and Laravel 10 or 11?
It does not target Laravel at all, and its 2021-era Composer constraints likely pin dompdf and Symfony versions that conflict with PHP 8.2 or 8.3 and current framework majors. Expect dependency resolution work or forced installs with ignore-platform-reqs if you try. Even if it installs, it provides no Laravel integration.
How do I generate a PDF from a Blade view with Dompdf in Laravel?
Use barryvdh/laravel-dompdf and call the facade, for example PDF::loadView('pdf.invoice', $data)->stream() to send the file to the browser or ->save() to write it to disk. The underlying engine is the same dompdf/dompdf library, so you get identical HTML-to-PDF behavior without a Symfony bundle. If you prefer no wrapper, instantiate Dompdf directly and call loadHtml(), render(), and stream().
What are Dompdf's CSS limitations for PDF rendering?
Dompdf has a CSS support ceiling: flexbox and CSS grid are partial or absent, font handling is limited, and JavaScript is not executed. It degrades sharply on large, table-heavy documents, so page count and table density matter. If modern CSS fidelity is required, consider headless Chrome, Gotenberg, or wkhtmltopdf instead. The Symfony bundle does not change any of these engine limitations.
Should I use prezent/dompdf-bundle in production or for queued PDF generation?
No. Zero dependents means there is no public evidence of anyone running this wrapper under production load. If you are generating PDFs in a Laravel app, queue the job and use a maintained wrapper or dompdf directly. Also resolve your document profile, volume, and SLA expectations before choosing an engine, because dompdf itself is the real product risk.
How do I migrate off prezent/dompdf-bundle?
Define an internal seam such as a PdfRenderer interface with render(HtmlDocument): PdfBinary, then implement it with dompdf directly or with barryvdh/laravel-dompdf in Laravel. Remove the bundle registration and delete the Composer dependency, and verify the pinned dompdf version is not held back by the old constraints. This costs roughly half a day and caps your exit cost at swapping one class.
How do I configure Dompdf options like paper size and fonts without the bundle?
With barryvdh/laravel-dompdf, publish the config file and set options such as defaultFont, orientation, and paper size there. With dompdf/dompdf directly, pass an options array to the Dompdf constructor or call setOption() before rendering. The Symfony bundle only supplies this configuration through Symfony's container, which is why it does not help in Laravel.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core