PHPackages                             breuer/laravel-pdf-chrome-driver - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. breuer/laravel-pdf-chrome-driver

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

breuer/laravel-pdf-chrome-driver
================================

Chrome DevTools Protocol driver for spatie/laravel-pdf

v2.0.0(yesterday)702[1 issues](https://github.com/jellebreuer/laravel-pdf-chrome-driver/issues)MITPHPPHP ^8.2CI passing

Since Oct 3Pushed yesterday1 watchersCompare

[ Source](https://github.com/jellebreuer/laravel-pdf-chrome-driver)[ Packagist](https://packagist.org/packages/breuer/laravel-pdf-chrome-driver)[ Docs](https://github.com/jellebreuer/laravel-pdf-chrome-driver)[ RSS](/packages/breuer-laravel-pdf-chrome-driver/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (18)Versions (19)Used By (0)

Chrome DevTools Protocol driver for spatie/laravel-pdf
======================================================

[](#chrome-devtools-protocol-driver-for-spatielaravel-pdf)

[![Latest Version on Packagist](https://camo.githubusercontent.com/935921199a1cf252d76d70b84985b00fb0d05459867107cf6127298bf2ca5709/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6272657565722f6c61726176656c2d7064662d6368726f6d652d6472697665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/breuer/laravel-pdf-chrome-driver)[![Total Downloads](https://camo.githubusercontent.com/1242c36baf32c2589efa7c7e4002b45dbffb8e18c72c7b0672a44f57636cd500/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6272657565722f6c61726176656c2d7064662d6368726f6d652d6472697665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/breuer/laravel-pdf-chrome-driver)[![GitHub Tests Action Status](https://camo.githubusercontent.com/66f900da74e1fd781647912fa67ee349ddaaf48684720813cd7fa08aee809220/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a656c6c656272657565722f6c61726176656c2d7064662d6368726f6d652d6472697665722f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/jellebreuer/laravel-pdf-chrome-driver/actions/workflows/run-tests.yml)[![GitHub PHPStan Action Status](https://camo.githubusercontent.com/af9d69a7cfd5f79cdb870c615189d86de980bebc852fca5a19020d1202f186ad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a656c6c656272657565722f6c61726176656c2d7064662d6368726f6d652d6472697665722f7068707374616e2e796d6c3f6272616e63683d6d6173746572266c6162656c3d7068707374616e267374796c653d666c61742d737175617265)](https://github.com/jellebreuer/laravel-pdf-chrome-driver/actions/workflows/phpstan.yml)[![GitHub Pint Action Status](https://camo.githubusercontent.com/be9fba931fc9cf74ae1d222e1798eb899a4b10954b693480efdafeabf5f9c4e2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a656c6c656272657565722f6c61726176656c2d7064662d6368726f6d652d6472697665722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d6173746572266c6162656c3d6c61726176656c25323070696e74267374796c653d666c61742d737175617265)](https://github.com/jellebreuer/laravel-pdf-chrome-driver/actions/workflows/fix-php-code-style-issues.yml)

A Chrome DevTools Protocol (CDP) driver for [spatie/laravel-pdf](https://github.com/spatie/laravel-pdf). Renders PDFs by communicating directly with `chrome-headless-shell` over CDP pipes — no Node.js, no Puppeteer, no Docker, no external services.

Requirements
------------

[](#requirements)

- **PHP 8.2+**
- **Laravel 11+**
- **[spatie/laravel-pdf](https://github.com/spatie/laravel-pdf) ^2.0**

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require breuer/laravel-pdf-chrome-driver
```

Download the headless Chrome binary:

```
php artisan pdf-chrome-driver:install
```

Set the driver in your `config/laravel-pdf.php`:

```
'driver' => 'chrome',
```

Or via your `.env` file:

```
LARAVEL_PDF_DRIVER=chrome

```

That's it. All `spatie/laravel-pdf` functionality now uses Chrome CDP under the hood.

Usage
-----

[](#usage)

This package is a driver for `spatie/laravel-pdf` — use spatie's API as documented in their [README](https://github.com/spatie/laravel-pdf):

```
use Spatie\LaravelPdf\Facades\Pdf;

Route::get('/pdf', function () {
    return Pdf::view('invoice', ['order' => $order]);
});
```

Configuration
-------------

[](#configuration)

Publish the config file to customize Chrome binary path or timeout:

```
php artisan vendor:publish --tag="pdf-chrome-driver-config"
```

```
return [
    'path' => env('PDF_CHROME_DRIVER_CHROME_PATH'),
    'timeout' => env('PDF_CHROME_DRIVER_TIMEOUT', 10),
];
```

### Linux ARM64

[](#linux-arm64)

Pre-built Chrome binaries are not available for Linux ARM64. Install Chromium via your package manager and point to it:

```
PDF_CHROME_DRIVER_CHROME_PATH=/usr/bin/chromium

```

How it works
------------

[](#how-it-works)

Unlike other drivers that shell out to Node.js or rely on external services, this driver:

1. Launches `chrome-headless-shell` with `--remote-debugging-pipe`
2. Communicates over CDP via file descriptors (fd 3/4) — no WebSocket, no port allocation
3. Injects HTML via `Page.setDocumentContent` — no temp files
4. Generates PDF via `Page.printToPDF`

Each request gets an isolated Chrome process with its own temp directory, cleaned up automatically.

License
-------

[](#license)

This package is open-sourced software licensed under the MIT License. Please see the [License File](LICENSE.md) for more information.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance97

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 55.5% 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 ~32 days

Recently: every ~2 days

Total

18

Last Release

1d ago

Major Versions

v0.3.1 → v1.0.0-alpha2026-04-02

v1.0.0 → v2.0.02026-04-04

PHP version history (2 changes)v0.0.1PHP ^8.1

v0.3.0PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![jellebreuer](https://avatars.githubusercontent.com/u/5371337?v=4)](https://github.com/jellebreuer "jellebreuer (127 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (54 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (47 commits)")[![sofyan-1999](https://avatars.githubusercontent.com/u/83222432?v=4)](https://github.com/sofyan-1999 "sofyan-1999 (1 commits)")

---

Tags

laravelpdfchromeBreuerlaravel-pdf-chrome-driver

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/breuer-laravel-pdf-chrome-driver/health.svg)

```
[![Health](https://phpackages.com/badges/breuer-laravel-pdf-chrome-driver/health.svg)](https://phpackages.com/packages/breuer-laravel-pdf-chrome-driver)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

9963.4M11](/packages/spatie-laravel-pdf)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M73](/packages/spatie-laravel-health)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[sunchayn/nimbus

A Laravel package providing an in-browser API client with automatic schema generation, live validation, and built-in authentication with a touch of Laravel-tailored magic for effortless API testing.

29428.0k](/packages/sunchayn-nimbus)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[spatie/laravel-mailcoach-sdk

An SDK to easily work with the Mailcoach API in Laravel apps

41290.2k1](/packages/spatie-laravel-mailcoach-sdk)

PHPackages © 2026

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