Download the PHP package bladepdf/spatie-laravel-pdf-driver without Composer

On this page you can find all versions of the php package bladepdf/spatie-laravel-pdf-driver. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package spatie-laravel-pdf-driver

BladePDF driver for Spatie Laravel PDF

Use BladePDF's managed Chromium rendering without changing the familiar Spatie\LaravelPdf\Facades\Pdf API.

Latest Packagist version CI status

This package registers BladePDF as a custom driver for Spatie Laravel PDF. Existing Blade views are rendered by Spatie and sent through the BladePDF Laravel asset pipeline to managed Chromium.

Requirements

Installation

Add your BladePDF API key:

Laravel package auto-discovery registers both the BladePDF client and the Spatie driver.

Use BladePDF for one PDF

Make BladePDF the default driver

Existing Spatie Laravel PDF calls then use BladePDF without calling driver():

Supported Spatie features

Spatie Laravel PDF feature BladePDF behavior
view() and html() Rendered HTML is sent through the BladePDF asset pipeline
headerView() / headerHtml() Forwarded as Chromium header HTML
footerView() / footerHtml() Forwarded as Chromium footer HTML
format() Forwarded to BladePDF
paperSize() Forwarded; custom dimensions take precedence over format()
margins() Forwarded with the selected unit
landscape() / portrait() Forwarded
scale() Forwarded
pageRanges() Forwarded
tagged() Forwarded
waitUntilReady() The readiness expression is forwarded
meta() Applied by Spatie after BladePDF returns the PDF
encrypt() Applied by Spatie after BladePDF returns the PDF
cache() Uses Spatie's cache layer
disk() and saveQueued() Uses Spatie's storage and queue flow

BladePDF always enables printed backgrounds through this driver, matching Spatie's Chromium drivers.

Readiness timeout

BladePDF supports the JavaScript expression passed to waitUntilReady(), but its API does not accept Spatie's optional per-expression timeout. This works:

Passing the second timeout argument throws UnsupportedReadinessTimeoutException instead of silently ignoring it. Configure BladePDF's HTTP timeout and your plan's render timeout when a longer render window is required.

Native BladePDF features

The Spatie driver is a compatibility layer. Use the native BladePDF:: facade when you need cloud templates, request-scoped asset overrides, BladePDF references, stored PDFs, webhooks, or BladePDF's native asynchronous render API.

See the full integration guide.

Testing

Spatie's Pdf::fake() continues to work because it fakes the builder before a driver is invoked. For driver-level tests, bind a fake implementation of BladePDF\Contracts\RenderClient; the immutable BladePDF\RenderRequest then exposes the exact core request produced by the integration.

Run this package's test suite with:

Upgrading from 1.x

Driver 2.x requires bladepdf/laravel:^2.0; driver 1.x remains paired with the Laravel package's 1.x line. Normal Spatie calls, the bladepdf driver name, option mapping, and readiness behavior do not change.

The driver still depends only on BladePdfFactory. It does not construct the core client or asset resolver, so published Laravel asset roots apply equally to native facade and Spatie renders.

License

The MIT License. See LICENSE.


All versions of spatie-laravel-pdf-driver with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
bladepdf/laravel Version ^2.0
spatie/laravel-pdf Version ^2.10
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bladepdf/spatie-laravel-pdf-driver contains the following files

Loading the files please wait ...