Laravel-dompdf is a Laravel wrapper for the DOMPDF HTML to PDF converter library.
The tool solves the problem of generating PDFs from HTML content within Laravel applications. It wraps the DOMPDF library to provide a Laravel-native interface, allowing developers to load HTML from strings, files, or view templates and output the result as a downloadable file, browser stream, or raw string. The wrapper integrates with Laravel's service container and facade system, enabling flexible instantiation through dependency injection, the container, or a static facade.
Developers should choose this tool if they are building Laravel applications that need PDF generation capabilities. It suits projects requiring invoices, reports, certificates, or other document generation from templated HTML. The tool supports configuration of paper size, orientation, fonts, and various rendering options through a publishable config file or runtime method chaining. Since version 3.x, remote resource access is disabled by default for security, though it can be explicitly enabled when needed. The wrapper also supports PDF/A-3b compliance for archival purposes when using DOMPDF version 3.1.0 or later with the CPDF backend.
The project maintains active engagement with community contributions and receives regular updates to address security concerns and support new DOMPDF features. Development activity shows responsiveness to issues and pull requests, with the codebase evolving to align with Laravel framework changes and best practices. The maintainers prioritize security by defaulting to conservative settings while providing configuration flexibility for projects with specific requirements.