Package

Barryvdh Laravel Snappy

Snappy PDF/Image for Laravel

Package

barryvdh/laravel-snappy

View on GitHub →

Overview

What Barryvdh Laravel Snappy does

Barryvdh's Laravel Snappy integrates Snappy PDF and Image generation into Laravel, providing a seamless way to convert HTML content into PDFs or images directly within applications.

The package acts as a bridge to the KnpLabs Snappy library, which itself is a wrapper around the wkhtmltopdf and wkhtmltoimage tools. This allows Laravel developers to easily generate PDFs and images from HTML content without having to deal with the intricacies of these command-line tools directly.

Using Laravel Snappy involves installing the wkhtmltopdf binaries, either directly from their website or as a composer dependency, and configuring the paths to these binaries. Once setup is complete, developers utilize the service provider and optional facades to generate the necessary files. HTML strings, files, or views can be converted to PDFs, which can be saved, displayed inline, or downloaded.

The integration shines in applications that require regular PDF generation from dynamic content, such as invoices or reports. Developers can leverage methods like loadHTML and loadView to process content and customize output preferences, such as paper size and orientation. For testing, the package offers a PDF fake method that assists in validating PDF generation logic without creating actual files, making it ideal for test-driven development.

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

Read the full README →

Barryvdh Laravel Snappy Related Articles

Laravel Debugbar v4.0.0 is released image

Laravel Debugbar v4.0.0 is released

Read article
Laravel Debugbar Gets a Big UI Update image

Laravel Debugbar Gets a Big UI Update

Read article
PhpStorm logo

PhpStorm

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

PhpStorm
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
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
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
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum