PHPackages                             bladepdf/laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. bladepdf/laravel

ActiveLibrary[Templating &amp; Views](/categories/templating)

bladepdf/laravel
================

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

v1.0.4(2w ago)1117111MITPHPPHP ^8.2CI passing

Since Jul 21Pushed 2w ago1 watchersCompare

[ Source](https://github.com/bladepdf/bladepdf-laravel)[ Packagist](https://packagist.org/packages/bladepdf/laravel)[ Docs](https://bladepdf.com)[ RSS](/packages/bladepdf-laravel/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (4)Dependencies (12)Versions (6)Used By (1)

 [    ![BladePDF](.github/assets/bladepdf-logo-on-light.webp)  ](https://bladepdf.com)

BladePDF for Laravel
====================

[](#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](https://camo.githubusercontent.com/5da4885b8a7151f28b0d92b603015a513b7c55b0cdaac0351513236916a4860f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c6164657064662f6c61726176656c3f7374796c653d666c61742d737175617265266c6162656c3d76657273696f6e)](https://packagist.org/packages/bladepdf/laravel) [![Packagist downloads](https://camo.githubusercontent.com/dfd40644454bcb68e6ab2ade29a5a346cc6614b0e7c5fcdb99d42a0c9aa7a0b8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626c6164657064662f6c61726176656c3f7374796c653d666c61742d737175617265266c6162656c3d646f776e6c6f616473)](https://packagist.org/packages/bladepdf/laravel/stats) [![Supported PHP versions](https://camo.githubusercontent.com/70cf8b812a62a080f4596efd91dd7e69c2099b3644aada6302e8b8051f713535/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f626c6164657064662f6c61726176656c2f7068703f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bladepdf/laravel) [![Laravel 10, 11, 12, and 13](https://camo.githubusercontent.com/b580304e8de350d7c441b14e1ce16320d662ed65153e5e5b4990eae4de643f6d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302532302537432532303131253230253743253230313225323025374325323031332d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/b580304e8de350d7c441b14e1ce16320d662ed65153e5e5b4990eae4de643f6d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302532302537432532303131253230253743253230313225323025374325323031332d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465) [![MIT license](https://camo.githubusercontent.com/b267ba8e20ba687e566a5b579095a46d765d854e4d16e194f22cb06cb4bfe563/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626c6164657064662f6c61726176656c3f7374796c653d666c61742d737175617265)](LICENSE) [![CI status](https://github.com/bladepdf/bladepdf-laravel/actions/workflows/ci.yml/badge.svg)](https://github.com/bladepdf/bladepdf-laravel/actions/workflows/ci.yml) [![Packagist auto-update enabled](https://camo.githubusercontent.com/a80813d66ef9ceeb3ed94ecd9c10a657e2f0247fd8850e849f0f870ba8f76aa2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5061636b61676973742d6175746f2d2d757064617465642d3136384146453f7374796c653d666c61742d737175617265266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/bladepdf/laravel)

 [![Install BladePDF, render a Laravel Blade invoice, and download the generated PDF](.github/assets/demo.gif)](.github/assets/demo.gif)

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

[](#installation)

Install the package:

```
composer require bladepdf/laravel
```

Add an [API key](https://app.bladepdf.com) 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
```

Verify webhooks
---------------

[](#verify-webhooks)

Store the signing secret shown when you create a BladePDF webhook endpoint:

```
BLADEPDF_WEBHOOK_SECRET=whsec_...
```

Then verify the request before decoding or processing its payload:

```
use BladePDF\Webhooks\SignatureValidator;
use Illuminate\Http\Request;

public function handle(Request $request)
{
    abort_unless(SignatureValidator::isValid($request), 401);

    $event = $request->json()->all();

    // Handle the verified event...
}
```

The validator checks the signature against the exact raw request body and rejects timestamps outside a five-minute tolerance by default. Pass a secret as the second argument for a per-request webhook, or publish the configuration to customize `webhook_tolerance`.

Using Spatie Laravel PDF?
-------------------------

[](#using-spatie-laravel-pdf)

Install the dedicated driver to keep the `Spatie\LaravelPdf\Facades\Pdf` API while BladePDF provides the managed Chromium backend:

```
composer require bladepdf/spatie-laravel-pdf-driver
```

See the [Spatie Laravel PDF integration guide](https://docs.bladepdf.com/integrations/spatie-laravel-pdf) for default-driver configuration, supported options, queues, and compatibility notes.

30-second example
-----------------

[](#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
--------

[](#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?
-------------

[](#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 concernSelf-hosted ChromiumBladePDFChrome and Node installationYou install and pin themManagedBrowser crashesYour workers absorb themIsolated from your appMemory and process tuningYour responsibilityManaged render capacityLocal CSS, images, and fontsExpose or rewrite themDiscovered and uploaded automaticallyQueue workersBuild and operate themAsync API with signed webhooksScalingAdd workers and replicasIncrease managed concurrencyBrowser and security updatesYour maintenance windowManagedTemplate operationsBuild your own workflowLocal 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
------------

[](#example-pdfs)

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

[Invoice](examples/invoice)[Event ticket](examples/ticket)[![Rendered invoice example](.github/assets/invoice.png)](examples/invoice)[![Rendered event ticket example](.github/assets/ticket.png)](examples/ticket)[Certificate](examples/certificate)[Business report](examples/report)[![Rendered certificate example](.github/assets/certificate.png)](examples/certificate)[![Rendered business report example](.github/assets/report.png)](examples/report)Documentation
-------------

[](#documentation)

 [**Read the full documentation →**](https://docs.bladepdf.com)

Start with the [quickstart](https://docs.bladepdf.com/quickstart), then explore the [asset pipeline](https://docs.bladepdf.com/asset-pipeline), [Blade templates](https://docs.bladepdf.com/blade-templates), [async renders](https://docs.bladepdf.com/api/async-renders), and [webhooks](https://docs.bladepdf.com/api/webhooks).

Supported features
------------------

[](#supported-features)

FeatureSupportedNotesLocal Blade templatesYesRender existing Laravel views with `fromView()`Raw HTMLYesSend prepared markup with `fromHtml()`Tailwind and plain CSSYesLocal stylesheets are resolved automaticallyImages and SVGYesLocal files are uploaded per render; remote URLs are preservedCustom fontsYesWOFF2, OTF, TTF, and CSS `@font-face` referencesHeaders and footersYesBlade views or raw HTML for local HTML rendersBackgroundsYesUse `showBackground()` or `transparentBackground()`Landscape and custom paperYesA3/A4 and any width/height supported by ChromiumPage ranges and marginsYesFluent helpers plus raw PDF optionsJavaScript renderingYesAvailable on supported plansAsync renderingYesStored PDFs plus a `202 Accepted` submissionSigned webhooksYes`pdf.rendered` and `pdf.failed` delivery eventsCloud Blade templatesYesPublish templates in the dashboard and render by idStored PDFsYesRetrieve the signed URL from the result or webhookLaravel versions10-13PHP 8.2 or newerLicense
-------

[](#license)

BladePDF for Laravel is open-source software licensed under the [MIT License](LICENSE).

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance97

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

5

Last Release

15d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec80e9ebe8a059054959326ad21f1dee47896139d0a3a40611549c7e9193d130?d=identicon)[bladepdf](/maintainers/bladepdf)

---

Top Contributors

[![bladepdf](https://avatars.githubusercontent.com/u/274593502?v=4)](https://github.com/bladepdf "bladepdf (21 commits)")

---

Tags

apibladebladepdfchromiumhtml-to-pdfinvoicelaravellaravel-packagelaravel-pdfpdfpdf-generationphpwebhooksapilaravelpdfbladepuppeteerinvoicechromiumhtml-to-pdftailwind csspdf-generationblade templatesbladepdf

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bladepdf-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/bladepdf-laravel/health.svg)](https://phpackages.com/packages/bladepdf-laravel)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k118.2M1.0k](/packages/laravel-socialite)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45945.2k1](/packages/pressbooks-pressbooks)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

1.0k2.5M152](/packages/roots-acorn)[moonshine/moonshine

Laravel administration panel

1.3k280.5k91](/packages/moonshine-moonshine)[hasinhayder/tyro-dashboard

Powerful and feature-rich dashboard for Laravel 13 and 12. Comes with complete authentication, user management, roles and privilege management, media management and dynamic CRUD

5585.6k](/packages/hasinhayder-tyro-dashboard)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
