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

Snappy Image Wrapper for Laravel image

Snappy Image Wrapper for Laravel

Read article
Organizing Snappy image

Organizing Snappy

Read article
HTTP Cache Packages for Laravel image

HTTP Cache Packages for Laravel

Read article
Laravel Debugbar Gets a Big UI Update image

Laravel Debugbar Gets a Big UI Update

Read article
75 Laravel Tutorials, Packages, and Resources from 2014 image

75 Laravel Tutorials, Packages, and Resources from 2014

Read article
Laravel Debugbar v4.0.0 is released image

Laravel Debugbar v4.0.0 is released

Read article

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

PhpStorm

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

PhpStorm

Let your users buy domains without leaving your app

If your Laravel app gives users a site, a storefront, or a workspace, they’ll eventually want their own domain. The name.com API lets them search, register, and connect one without leaving your product. It’s a clean REST API, so Laravel’s HTTP client is all you need.

Let your users buy domains without leaving your app

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum

Shift

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

Shift

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