LaravelPackages.net
Acme Inc.
Toggle sidebar
bladepdf/laravel

Generate production-ready PDFs from Laravel Blade views with managed Chromium, automatic assets, and a fluent API.

2
2
v1.0.1
About bladepdf/laravel

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

BladePDF

BladePDF for Laravel

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.

Latest Packagist version Packagist downloads Supported PHP versions Laravel 10, 11, 12, and 13 MIT license CI status Packagist auto-update enabled

Install BladePDF, render a Laravel Blade invoice, and download the generated PDF

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.

Installation

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

30-second example

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.

Features

  • ✅ Local Laravel Blade views and raw HTML
  • ✅ Tailwind CSS, plain CSS, and print styles
  • ✅ Local images, SVG, stylesheets, and custom fonts
  • ✅ Automatic asset discovery and request-scoped uploads
  • ✅ Headers, footers, backgrounds, and custom page sizes
  • ✅ JavaScript rendering and external assets on supported plans
  • ✅ Cloud Blade templates and hosted assets
  • ✅ Stored PDFs with signed retrieval URLs
  • ✅ Asynchronous rendering with signed webhooks
  • ✅ Fluent Laravel API with typed result objects

Why BladePDF?

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.

Example PDFs

Each example includes a production-quality Blade template, realistic sample data, a rendered preview, and a focused README.

| Invoice | Event ticket | | --- | --- | | Rendered invoice example | Rendered event ticket example | | Certificate | Business report | | Rendered certificate example | Rendered business report example |

Documentation

Read the full documentation →

Start with the quickstart, then explore the asset pipeline, Blade templates, async renders, and webhooks.

Supported features

| 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 |

License

BladePDF for Laravel is open-source software licensed under the MIT License.