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

es/dompdf-bundle

Symfony bundle that wraps the dompdf library, letting you convert HTML into PDFs from your controllers. Stream PDFs to the browser or grab the binary content, and configure options like DPI and paper size via YAML.

View on GitHub
Deep Wiki
Context7

symfony2 dompdf bundle

Frequently asked questions about Dompdf Bundle
Is es/dompdf-bundle a Laravel package?
No. It is a Symfony 2 bundle that registers through AppKernel and exposes a dompdf container service. Laravel has no bundle lifecycle or YAML bundle config loader, so there is no attachment point for this package. For Laravel, use a Laravel-specific wrapper instead.
Can I install es/dompdf-bundle in Laravel 10 or 11?
No, not realistically. Its Composer constraints target Symfony 2.x and an old dompdf release, while modern Laravel requires Symfony 6/7 components and PHP 8.1+. Dependency resolution fails without ignoring platform requirements and hand-editing constraints, which is not production-safe.
What should Laravel developers use instead of es/dompdf-bundle?
Use barryvdh/laravel-dompdf if you want the same dompdf engine with a maintained Laravel wrapper. It provides a service provider, facade, publishable config, and stream/download/output methods. Alternatively, bind dompdf/dompdf directly in your own service provider for zero wrapper risk.
How do I configure DPI and paper size in es/dompdf-bundle?
In Symfony you set options under es_dompdf.defaults in YAML, such as dpi: 150 and defaultPaperSize: A4. The bundle passes that array into dompdf's constructor. In Laravel, the equivalent is a published config file plus a singleton binding.
How do I stream a PDF to the browser with es/dompdf-bundle?
You fetch the dompdf service from the Symfony container and call streamHtml($html, 'document.pdf'). That sends the generated PDF to the browser. There is no Laravel facade or helper for this API.
How do I get raw PDF binary content from es/dompdf-bundle?
Call getPdf($html) on the dompdf service to receive the PDF as binary content. You can then save it, email it, or return it in a custom response. The bundle only wraps that call; it does not add storage or queueing.
Is es/dompdf-bundle maintained and safe for production?
No. The last release was in 2017, it has zero stars and no CI or issue evidence, and Symfony 2 reached end of life in 2018. HTML-to-PDF is an injection surface, and the bundled dompdf version predates years of security hardening. Treat it as abandoned.
Does es/dompdf-bundle support PHP 8 and modern Symfony?
No. It is built for Symfony 2 and pins dependencies from that era. Modern Laravel and Symfony applications run on PHP 8.1+ and Symfony 6/7, so the package will not resolve cleanly. The only install path involves ignoring platform requirements, which is disqualifying for production.
How hard is it to replicate es/dompdf-bundle in Laravel?
The package's real contribution is small: bind Dompdf\Dompdf in a container, pass a config array to its constructor, and wrap streamHtml and getPdf. In Laravel that is a service provider, a config file, and roughly twenty lines of adapter code. You are better off owning that small adapter than adopting an EOL Symfony bundle.
Can I test es/dompdf-bundle with Laravel or Pest?
Not meaningfully. The package has no Laravel integration, no test suite or CI evidence in the assessment, and its Symfony 2 bootstrapping does not run in a Laravel test kernel. You would be testing your own adapter, not the bundle. If you need tested PDF generation, choose a maintained Laravel package.
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.
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment