Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Easy Pdf Laravel Package

tarfin-labs/easy-pdf

Easy PDF makes PDF generation in Laravel effortless: render Blade views or raw HTML through headless Chrome, then save, download, or stream the result with a clean, fluent API. Configure page size, orientation, margins, and more in just a few lines.

View on GitHub
Deep Wiki
Context7

Pdf wrapper for laravel

Frequently asked questions about Easy Pdf
How do I install tarfin-labs/easy-pdf in a Laravel application?
Install it with Composer using composer require tarfin-labs/easy-pdf. Laravel package auto-discovery registers the service provider and facade, so no manual wiring is normally needed. Publishing the config file is optional and lets you set defaults such as page size, orientation, and margins. Check the package README for the exact vendor:publish tag before changing defaults.
Does Easy PDF need headless Chrome installed on the server?
Yes. Easy PDF renders Blade views or raw HTML through headless Chrome, so a Chrome or Chromium binary must be available to the PHP process. You also need the usual PHP extensions for font and image handling, such as mbstring and gd or imagick, plus system font packages. Verify the binary path and permissions in staging and production, because container images often differ from local development.
Which Laravel and PHP versions does Easy PDF 3.0.0 support?
Version 3.0.0 adds Laravel 13 and PHP 8.5 support and drops legacy Laravel and PHP versions. The changelog does not state the exact new minimum PHP or illuminate/* constraints, so read composer.json in the 3.0.0 tag before upgrading. Applications on older Laravel or PHP lines are blocked by Composer and should stay on the 2.11.x release.
How do I generate a PDF from a Blade view with Easy PDF?
Pass a Blade view name and its data to the fluent Easy PDF API, then choose a terminal action such as save, download, or stream. The package renders the compiled HTML through headless Chrome and returns the resulting PDF. Keep view data simple and avoid JavaScript-dependent layouts unless you have tested them in the rendering engine.
Can I set page size, orientation, and margins in Easy PDF?
Yes. Easy PDF exposes page size, orientation, margins, and similar options through its publishable configuration and fluent call chain. Set sensible defaults in config and override them per document when a report or label needs different dimensions. Confirm the exact option keys against the README for your installed version.
How do I return a PDF as a download or stream it in a Laravel controller?
The fluent API offers save, download, and stream as terminal actions, so you can store the file, return a download response, or stream it inline. Use download for user-facing exports and stream when the browser should preview the PDF. For large documents, avoid holding extra copies in memory and let the package handle the response.
Is Easy PDF suitable for queued invoice or report generation?
Yes, it has no queue assumptions of its own, so you can call it from a queued job and store the output on any Laravel disk. Headless Chrome rendering is relatively heavy, so queueing is a good idea for large batches or user-triggered exports. Add timeouts, retries, and cleanup for temporary files, and monitor Chrome memory use in production.
Is upgrading from Easy PDF 2.11.x to 3.0.0 a breaking change?
Yes. 3.0.0 is a major release that adds Laravel 13 and PHP 8.5 support while dropping legacy versions, so Composer will block older platforms. The changelog is a single squashed pull request and provides no migration guide, so pin ^2.11 in production until you have verified the new constraints. Run a spike branch and compare rendered output against a golden-file baseline before switching.
How should I test PDF generation in a Laravel app using Easy PDF?
Assert that the expected file is created, that the response has the right content type, and that key text is present in the generated PDF. For upgrades, capture a baseline of real templates on 2.11.x as PDFs and extracted-text hashes, then diff new output in a spike branch. Avoid brittle pixel-perfect assertions unless you control the Chrome version and fonts.
What are good alternatives to Easy PDF for PDF generation in Laravel?
Common alternatives include dompdf, mPDF, wkhtmltopdf wrappers such as Snappy, and Browsershot-style headless Chrome tools. Easy PDF is an opinionated Laravel wrapper around headless Chrome, which is a good fit when you want modern CSS support and a small fluent API. Choose based on rendering fidelity, binary and extension requirements, and whether you need an engine-agnostic abstraction.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect