barryvdh/laravel-dompdf
66.1
Adequate · 19 September 2026
778
lines of production code
PHP
primary language
1
measurement over time
What this system is
This system is a Laravel and Lumen wrapper for the Dompdf library, designed to facilitate PDF generation within PHP applications. It provides a facade-based interface for loading views or HTML, rendering them into PDFs, and managing output formats such as downloading, streaming, or saving to storage. The package supports configurable options for paper settings and PDF/A-3b compliance, while maintaining compatibility with modern PHP and Laravel versions.
Features
Initial configuration file for Dompdf integration
A new \config/dompdf.php\ file has been added to the application, providing a comprehensive set of default settings for the Dompdf library. This configuration allows users to customize PDF generation behavior, including enabling PDF/A-3b compliance for archival-quality documents, adjusting font directories and caching paths, defining allowed URI protocols for security, and selecting the rendering backend (defaulting to CPDF). It also exposes options for paper size, orientation, media type, and warning handling, serving as the central point for overriding Dompdf's internal defaults.
config · high confidence
Initial project scaffolding and documentation
This release establishes the foundational structure for the Laravel DOMPDF wrapper by adding essential configuration and documentation files. It introduces .editorconfig and .gitattributes to standardize coding styles and repository exports, alongside a MIT LICENSE file. The CHANGELOG.md is added to track version history, while the README.md is updated to provide comprehensive installation and usage instructions for both Laravel and Lumen, including configuration details and examples for generating PDFs.
(repo-wide) · high confidence
Introduces static facade for PDF generation with magic method support
A new static facade class \Barryvdh\\DomPDF\\Facade\\Pdf\ is added, allowing users to access the PDF service via static method calls (e.g., \Pdf::loadView()\) instead of resolving the instance from the container. The facade delegates all calls to the underlying \dompdf.wrapper\ service and includes PHPDoc annotations for magic methods, enabling IDE autocompletion for operations like setting paper size, loading views/HTML, and outputting the PDF.
src/Facade · high confidence
PDF generation now supports PDF/A-3b compliance and configurable options
Users can now generate PDF/A-3b compliant documents by calling the new \setPdfA()\ method on the PDF instance, which automatically embeds required fonts (like DejaVu Sans) and enables subsetting to ensure validation. Additionally, the library exposes \setOption()\ and \setOptions()\ methods, allowing direct manipulation of underlying Dompdf configuration settings, including the ability to merge new options with defaults. The service provider has been updated to bind the Dompdf instance and wrapper separately, ensuring that configuration changes via \dompdf.options\ are correctly applied during instantiation.
src · high confidence
Removals
Removal of legacy DOMPDF configuration file
The legacy \src/config/config.php\ file, which previously defined DOMPDF settings such as the configuration file path, orientation, and paper size, has been removed from the codebase. This change eliminates the local configuration overrides for the PDF generation library, implying that users should now rely on the default settings provided by the \dompdf/dompdf\ package or manage these settings through a different configuration mechanism.
src/config · high confidence
Removal of legacy Laravel DomPDF integration files
The Facade, PDF wrapper class, and ServiceProvider for the Barryvdh DomPDF package have been removed from the source code. This eliminates the legacy Laravel-specific integration layer that previously handled PDF generation via the 'dompdf' service container binding, view rendering, and configuration loading.
src/Barryvdh · high confidence
Test coverage
Initial test suite for PDF generation and facade usage
Added a new test suite (PdfTest) and supporting test infrastructure (TestCase, test views) to verify the PDF package's core functionality. The tests cover creating PDFs via the Facade and aliases, downloading and streaming responses with correct headers, saving PDFs to local storage and disks, handling filename quoting and fallbacks, using magic methods for configuration, and rendering inline data images.
tests · high confidence
Dependencies
Major dependency upgrade to Dompdf 3 and Laravel 9-13 support
This update significantly raises the minimum requirements for the package, dropping support for older PHP versions (now requiring PHP 8.1+) and older Laravel releases (now supporting Laravel 9 through 13). The core PDF generation library has been upgraded from previous versions to Dompdf 3.1, and the internal font library dependency has been removed, likely relying on Dompdf's bundled capabilities. Additionally, the package now uses PSR-4 autoloading, includes explicit license and keyword metadata, and configures auto-discovery for Laravel service providers and aliases.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 66.
Lenses
- Code Health 100
- Architecture 69
- Maturity 54
- Readiness 73
- Security 100
Changes since last survey
- 209 commits — 191 feature/other, 18 fixes
By area
- (root) — 97 commits
- src/PDF.php — 22 commits
- src/Barryvdh — 20 commits
- (repo) — 19 commits
- src/ServiceProvider.php — 14 commits
- config/dompdf.php — 10 commits
- .github/workflows — 7 commits
- src/config — 5 commits
- .github/stale.yml — 4 commits
- .github/FUNDING.yml — 2 commits
- .github/ISSUE_TEMPLATE — 2 commits
- src/Facade — 2 commits
- src/Facade.php — 2 commits
- resources/boost — 1 commit
- tests/PdfTest.php — 1 commit
- tests/TestCase.php — 1 commit
Notable commits
- fix: Add PHPStan, fix violations (#799)
- fix: Add ability to turn off converting entities + fix rendering DejavuSans with footer text (#570)
- fix: Fix ServiceProvider order
- fix: Fix badges (#1062)
- fix: Fix error with new PHP versions 'Parameter must be an array or an object that implements Countable' (#381)
- fix: Fix named arguments when using facade (#1002)
- fix: Fix options
- fix: Fix phpstan analysis (#972)
- fix: Fix setOptions (#1040)
- fix: Fix setOptions method (#974)
- fix: Fix workflow (#1048)
- fix: Fixed path to match L5
- fix: Merge pull request #93 from juukie14/fix-indent
- fix: Redirect rendering bugs (#1057)
- fix: Revert "Fix setOptions method (#974)" (#1039)
- fix: Revert "Replaced base_path('public') with public_path() in ServiceProvider (#867)" (#884)
- fix: Small typo fix in dompdf config file (#1004)
- fix: str_contains bug fix on laravel ^6.0 (#601)
- change: #228 Allow to set paper and orientation
- change: Add .editorconfig file (#926)
- …and 189 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
barryvdh/laravel-dompdf was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit a7f7e228b91d95f8dde56e1cff236f15713bb0f0 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.