PHPackages                             eckinox/php-puppeteer - 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. eckinox/php-puppeteer

ActivePhp-wrapper[PDF &amp; Document Generation](/categories/documents)

eckinox/php-puppeteer
=====================

PHP Wrapper for Google Chrome Puppeteer

v1.0.0(4y ago)19.9k↓72.7%1MITPHPPHP &gt;=5.4.0

Since Jan 5Pushed 4y agoCompare

[ Source](https://github.com/eckinox/php-puppeteer)[ Packagist](https://packagist.org/packages/eckinox/php-puppeteer)[ Docs](http://github.com/eckinox/php-puppeteer)[ RSS](/packages/eckinox-php-puppeteer/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)DependenciesVersions (6)Used By (1)

PHP Puppeteer
=============

[](#php-puppeteer)

This project provides the ability to generate PDF with [Puppeteer](https://github.com/GoogleChrome/puppeteer) in PHP.

- PHP 5 Compatible
- No Dependent Package
- Easy to Use

Getting started
---------------

[](#getting-started)

### 1. Install Puppeteer

[](#1-install-puppeteer)

To install Puppeteer and its dependencies, we recommend you take a look at [Puppeteer's official installation guide](https://developers.google.com/web/tools/puppeteer/get-started) as well as their [official troubleshooting guide](https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md).

Here is a snippet for Ubuntu (tested on 20.04) that works well at the time of writing:

```
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libappindicator3-1 libatk-bridge2.0-0 libgbm1
sudo npm install --global --unsafe-perm puppeteer
sudo chmod -R o+rx /usr/lib/node_modules/puppeteer/.local-chromium
```

### 2. Install the package through Composer

[](#2-install-the-package-through-composer)

Install this package using Composer:

```
composer require eckinox/php-puppeteer
```

### 3. Start generating PDFs!

[](#3-start-generating-pdfs)

Check out the examples and the documentation below to learn how to use the library

---

Usage examples
--------------

[](#usage--examples)

Here are a few very basic examples to get started:

### Generating PDFs from an URL

[](#generating-pdfs-from-an-url)

```
