finds.dev← search

// the find

barryvdh/laravel-dompdf

★ 7,277 · PHP · MIT · updated Jul 2026

A DOMPDF Wrapper for Laravel

A Laravel wrapper around the dompdf library, letting you generate PDFs from Blade views or HTML strings with a fluent API. It's the de facto standard for Laravel PDF generation — if you need invoices or reports in a Laravel app and don't want to think hard about it, this is what you reach for.

The API is genuinely pleasant — `Pdf::loadView('invoice', $data)->download()` covers 90% of use cases in one line. PDF/A-3b support with Factur-X/Zugferd embedded XML is a legitimate addition for anyone doing European e-invoicing compliance. The chroot and remote-disabled defaults are sensible security choices that most developers won't remember to set themselves. Actively maintained (last push two days ago) despite being a wrapper around a third-party renderer.

Dompdf's CSS support is stuck around CSS 2.1 — flexbox, grid, and most modern layout is unsupported, so anything beyond basic invoice-style HTML will fight you. Font handling is painful: non-Latin scripts need manual font installation, font subsetting is disabled by default (bloating file size), and the storage/fonts directory permissions trip up nearly every first-time deployer. The test suite is thin — one test file, essentially smoke tests. And the underlying dompdf renderer is slow on complex documents; there's no async/queue integration built in, so generating large PDFs in a web request will time out.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →