PHPackages                             synergitech/chrome-pdf-php - 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. synergitech/chrome-pdf-php

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

synergitech/chrome-pdf-php
==========================

v3.1.0(1y ago)2106.3k↓76.6%2[1 issues](https://github.com/SynergiTech/chrome-pdf-php/issues)[1 PRs](https://github.com/SynergiTech/chrome-pdf-php/pulls)MITPHPPHP ^8.1CI passing

Since Dec 4Pushed 3w ago5 watchersCompare

[ Source](https://github.com/SynergiTech/chrome-pdf-php)[ Packagist](https://packagist.org/packages/synergitech/chrome-pdf-php)[ Docs](https://github.com/SynergiTech/chrome-pdf-php)[ RSS](/packages/synergitech-chrome-pdf-php/feed)WikiDiscussions master Synced 1w ago

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

PHP ChromePDF Renderer
======================

[](#php-chromepdf-renderer)

[![Tests](https://github.com/SynergiTech/chrome-pdf-php/actions/workflows/main.yml/badge.svg)](https://github.com/SynergiTech/chrome-pdf-php/actions/workflows/main.yml)

*For pre-V1 documentation [click here](https://github.com/SynergiTech/chrome-pdf-php/blob/v0/README.md)*

*For pre-V3 documentation [click here](https://github.com/SynergiTech/chrome-pdf-php/blob/v2/README.md)*

This is a library for creating PDFs from HTML rendered with the SkPDF backend via Chrome. In order to do this, you can opt to use one of the supported drivers:

- [SynergiTech/chrome-pdf](https://github.com/SynergiTech/chrome-pdf)
- [Browserless](https://www.browserless.io/)

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

[](#installation)

```
composer require synergitech/chrome-pdf-php

```

### chrome-pdf

[](#chrome-pdf)

If you are planning to use the [`chrome-pdf`](https://github.com/SynergiTech/chrome-pdf) driver to render PDFs locally, you should also make sure to install this from npm.

### Browserless

[](#browserless)

If you are planning to use the [Browserless](https://www.browserless.io/) driver to render PDFs remotely or take screenshots, you should register for an API key. Remember that local assets cannot be rendered by Browserless.

Usage
-----

[](#usage)

A common interface is provided via AbstractPDF. The options presented via this class will be available from all drivers.

You should instantiate one of the available drivers, potentially passing options required by the driver:

```
use SynergiTech\ChromePDF\Chrome;
use SynergiTech\ChromePDF\Browserless;

$pdf = new Chrome('path-to-chrome-pdf');
$pdf->renderContent('test');

$pdf = new Browserless('your-api-key');
$pdf->renderContent('test');
```

### Advanced Browserless Usage

[](#advanced-browserless-usage)

You can optionally use specific endpoints when you create a client.

```
use SynergiTech\ChromePDF\Browserless;

$pdf = new Browserless('your-api-key', Browserless\EndpointsEnum::London);
```

As this library essentially functions as an API client for Browserless, we have also implemented the screenshot API.

```
use SynergiTech\ChromePDF\Browserless;

// For information on options, see https://www.browserless.io/docs/screenshot#custom-options.
// `render()` defaults to using png and fullPage set to false
// but jpegs will get a quality of 75 set if you don't set one
$file = new Browserless\Screenshot('your-api-key');
$file->render('https://example.com');
$file->render('https://example.com', [
    'fullPage' => true,
    'type' => 'jpeg',
]);
```

Examples
--------

[](#examples)

Some examples can be found in the `examples` folder.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance64

Regular maintenance activity

Popularity35

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 52.4% 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 ~168 days

Recently: every ~103 days

Total

15

Last Release

392d ago

Major Versions

v0.x-dev → v1.0.02019-10-23

v1.0.0 → v2.0.02021-05-05

v2.x-dev → v3.0.02024-04-10

PHP version history (4 changes)v0.1.0PHP &gt;=7.1

v2.0.0PHP ^7.3|^8.0

v2.1.1PHP ^7.3|^8.0|^8.1

v3.0.0PHP ^8.1

### Community

Maintainers

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

---

Top Contributors

[![willpower232](https://avatars.githubusercontent.com/u/1619102?v=4)](https://github.com/willpower232 "willpower232 (43 commits)")[![Josh-G](https://avatars.githubusercontent.com/u/487384?v=4)](https://github.com/Josh-G "Josh-G (15 commits)")[![CraicOverflow89](https://avatars.githubusercontent.com/u/20504052?v=4)](https://github.com/CraicOverflow89 "CraicOverflow89 (15 commits)")[![ebebbington](https://avatars.githubusercontent.com/u/47337480?v=4)](https://github.com/ebebbington "ebebbington (5 commits)")[![harry-synergi](https://avatars.githubusercontent.com/u/44359670?v=4)](https://github.com/harry-synergi "harry-synergi (2 commits)")[![luigitec](https://avatars.githubusercontent.com/u/13278505?v=4)](https://github.com/luigitec "luigitec (1 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

browserlesschromechrome-pdfpdfphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/synergitech-chrome-pdf-php/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k532.1M19.2k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[spatie/laravel-health

Monitor the health of a Laravel application

88011.3M149](/packages/spatie-laravel-health)[spatie/flare-client-php

Send PHP errors to Flare

177156.9M21](/packages/spatie-flare-client-php)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21764.8M1.6k](/packages/drupal-core)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

744284.3k34](/packages/civicrm-civicrm-core)

PHPackages © 2026

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