Generate production-ready PDFs from Laravel Blade views with managed Chromium, automatic assets, and a fluent API.
bladepdf/laravel is a Laravel package for generate production-ready pdfs from laravel blade views with managed chromium, automatic assets, and a fluent api..
It currently has 2 GitHub stars and 2 downloads on Packagist (latest version v1.0.1).
Install it with composer require bladepdf/laravel.
Discover more Laravel packages by bladepdf
or browse all Laravel packages to compare alternatives.
Last updated
Production-ready Laravel PDF generation from the Blade views you already use.
Generate beautiful PDFs without installing Chromium, maintaining browser workers, or exposing local assets.
Browsershot and Puppeteer give you browser-level control. Spatie's Laravel PDF package gives you a choice of rendering drivers. BladePDF is for Laravel teams that want the familiar Blade workflow while the browser lifecycle, asset uploads, concurrency, storage, and async delivery are managed for them.
Install the package:
composer require bladepdf/laravel
Add an API key to your environment:
BLADEPDF_API_KEY=your_api_key
Configuration is auto-discovered. Publish it only when you need to change timeouts, retries, SSL verification, or asset resolution:
php artisan vendor:publish --tag=bladepdf-config
use BladePDF\Laravel\Facades\BladePDF;
return BladePDF::fromView('pdf.invoice', ['invoice' => $invoice])
->render()
->download("invoice-{$invoice->number}.pdf");
That is the complete synchronous flow: BladePDF renders the local view, resolves referenced assets, generates the PDF, and returns a Laravel download response.
Running Chromium is straightforward in development. Production adds browser installs, process crashes, memory pressure, security updates, queue capacity, and asset URLs that the renderer can actually reach.
| Operational concern | Self-hosted Chromium | BladePDF | | --- | --- | --- | | Chrome and Node installation | You install and pin them | Managed | | Browser crashes | Your workers absorb them | Isolated from your app | | Memory and process tuning | Your responsibility | Managed render capacity | | Local CSS, images, and fonts | Expose or rewrite them | Discovered and uploaded automatically | | Queue workers | Build and operate them | Async API with signed webhooks | | Scaling | Add workers and replicas | Increase managed concurrency | | Browser and security updates | Your maintenance window | Managed | | Template operations | Build your own workflow | Local views plus cloud templates |
Focus on generating PDFs instead of maintaining browser infrastructure.
BladePDF is a hosted API, so it requires network access and an API key. Choose a self-hosted driver when offline rendering, data locality, or low-level browser control is more important than operational simplicity.
Each example includes a production-quality Blade template, realistic sample data, a rendered preview, and a focused README.
| Invoice | Event ticket |
| --- | --- |
|
|
|
| Certificate | Business report |
|
|
|
Start with the quickstart, then explore the asset pipeline, Blade templates, async renders, and webhooks.
| Feature | Supported | Notes |
| --- | :---: | --- |
| Local Blade templates | Yes | Render existing Laravel views with fromView() |
| Raw HTML | Yes | Send prepared markup with fromHtml() |
| Tailwind and plain CSS | Yes | Local stylesheets are resolved automatically |
| Images and SVG | Yes | Local files are uploaded per render; remote URLs are preserved |
| Custom fonts | Yes | WOFF2, OTF, TTF, and CSS @font-face references |
| Headers and footers | Yes | Blade views or raw HTML for local HTML renders |
| Backgrounds | Yes | Use showBackground() or transparentBackground() |
| Landscape and custom paper | Yes | A3/A4 and any width/height supported by Chromium |
| Page ranges and margins | Yes | Fluent helpers plus raw PDF options |
| JavaScript rendering | Yes | Available on supported plans |
| Async rendering | Yes | Stored PDFs plus a 202 Accepted submission |
| Signed webhooks | Yes | pdf.rendered and pdf.failed delivery events |
| Cloud Blade templates | Yes | Publish templates in the dashboard and render by id |
| Stored PDFs | Yes | Retrieve the signed URL from the result or webhook |
| Laravel versions | 10-13 | PHP 8.2 or newer |
BladePDF for Laravel is open-source software licensed under the MIT License.