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

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

royalty/chrome-pdf
==================

Chrome PHP wrapper for generating PDF files easily

013PHP

Since Jul 17Pushed 1mo agoCompare

[ Source](https://github.com/runbiscuit/ChromePDF)[ Packagist](https://packagist.org/packages/royalty/chrome-pdf)[ RSS](/packages/royalty-chrome-pdf/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

ChromePDF
=========

[](#chromepdf)

[![License](https://camo.githubusercontent.com/cd5ce55c54a622714b12f01a7f2a9c854eca9d92b68b71d0e7e1b3f54d95669f/68747470733a2f2f706f7365722e707567782e6f72672f726f79616c74792f6368726f6d652d7064662f6c6963656e7365)](https://packagist.org/packages/royalty/chrome-pdf)

**ChromePDF is an very simple Chrome PDF wrapper, written in PHP**

This library is inspired by [DomPDF](https://github.com/dompdf/dompdf), attempting to retain most of the applicable syntax that it uses, while reducing the amount of effort needed in development. It also aims to reduce the external dependency that comes along with using other (excellent) libraries like PuPHPeteer and chrome-php/chrome.

---

Features
--------

[](#features)

- Works

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

[](#requirements)

- PHP version 7.1 or higher
- Chrome

Easy Installation
-----------------

[](#easy-installation)

### Install with composer

[](#install-with-composer)

To install with [Composer](https://getcomposer.org/), simply require the latest version of this package.

```
composer require royalty/chrome-pdf
```

Make sure that the autoload file from Composer is loaded.

```
// somewhere early in your project's loading, require the Composer autoloader
// see: http://getcomposer.org/doc/00-intro.md
require 'vendor/autoload.php';
```

### Install with git

[](#install-with-git)

From the command line, switch to the directory where ChromePDF will reside and run the following commands:

```
git clone https://github.com/runbiscuit/ChromePDF.git
```

Require ChromePDF and it's dependencies in your PHP.

Quick Start
-----------

[](#quick-start)

Just pass your HTML in to ChromePDF and save the output:

```
// reference the ChromePDF namespace
use Royalty\ChromePDF\ChromePDF;

// instantiate and use the ChromePDF class
$chromepdf = new ChromePDF();
$chromepdf->loadHtml('Hello world! If you can see this, this library works!');

// Save the pdf
$chromepdf->save('output.pdf');
```

### Setting Options

[](#setting-options)

Set options anytime before running `save(string $output_path)`:

Method SignatureDescription (**default** is bolded)`setGPUAcceleration(bool $setting)`Set GPU Acceleration (on/**off**)`setMargins(bool $setting)`Set Margins (**on**/off)`setPDFHeaders(bool $setting)`Set PDF Headers (**on**/off)`setWindowSize($width, $height)`Set Window Size (default: **800x600**)`setRenderWait($duration = 0)`Set Render Wait (timeout before loading, default: 0)`improveRenderingQuality(bool $setting = true)`Improve Rendering Quality (on/**off**)License
-------

[](#license)

This project is licensed under the The MIT License (MIT).

###  Health Score

21

—

LowBetter than 17% of packages

Maintenance61

Regular maintenance activity

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e37f32b08389ca181d0ba35b3dbc9f8caf6a7c56990919744d35d3d24af8f84a?d=identicon)[biscuit.sh](/maintainers/biscuit.sh)

### Embed Badge

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

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

###  Alternatives

[rodenastyle/stream-parser

PHP Multiformat Streaming Parser

442206.4k2](/packages/rodenastyle-stream-parser)[cybermonde/odtphp

ODT document generator

49123.4k1](/packages/cybermonde-odtphp)[akeneo-labs/excel-connector-bundle

Akeneo PIM Excel connector bundle

166.4k](/packages/akeneo-labs-excel-connector-bundle)

PHPackages © 2026

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