Package

Spatie Laravel Pdf

Create PDFs in Laravel apps

Package

spatie/laravel-pdf

View on GitHub →

Overview

What Spatie Laravel Pdf does

Spatie's Laravel PDF package offers a versatile solution for generating PDFs within Laravel applications using various rendering drivers.

The package is designed for developers who need to create PDFs from Blade views with simplicity and flexibility. It supports a range of drivers including Browsershot, Gotenberg, Cloudflare Browser Run, WeasyPrint, DOMPDF, and chrome-php. These options allow developers to tailor the PDF creation process to their specific needs, whether it's using modern CSS features with Chromium-based drivers or opting for a zero-dependency setup with DOMPDF.

A key feature is the ability to render a Blade view with given data and save it as a PDF. This operation can be performed with a straightforward API that integrates seamlessly into existing Laravel applications. Moreover, PDFs can be returned directly as responses from controllers, making it easy to serve downloadable content such as invoices or reports.

The package also supports testing capabilities, allowing developers to verify that their PDFs are rendered correctly within the application. By using the testing tools provided, developers can simulate PDF creation and assert that the output meets expectations. This ensures reliability in critical applications where automated document generation is a core feature.

Additionally, the integration with Laravel Boost helps enhance AI agent capabilities within projects, facilitating the creation of correct PDF code automatically. This feature, coupled with extensive documentation and testing support, makes Spatie's Laravel PDF package a strong choice for teams using Laravel to build applications that require dynamic PDF generation.

This overview was generated by AI from the package README and may not reflect the latest release.

Read the full README →

Spatie Laravel Pdf Related Articles

Generate PDFs in Laravel from Blade Views image

Generate PDFs in Laravel from Blade Views

Read article
Lens for Laravel Brings WCAG Auditing to Your Local Dev Workflow image

Lens for Laravel Brings WCAG Auditing to Your Local Dev Workflow

Read article
Pushsilver logo

Pushsilver

Pushsilver is simple invoicing for freelancers and small studios — send polished invoices, automate reminders, and get paid on time without the bloat.

Pushsilver
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $9500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift