PHP ChromePDF Renderer
For pre-V1 documentation click here
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:
Installation
composer require synergitech/chrome-pdf-php
chrome-pdf
If you are planning to use the chrome-pdf driver to render PDFs locally, you should also make sure to install this from npm.
browserless
If you are planning to use the browserless driver to render PDFs remotely, you should register for an API key. Remember that local assets cannot be rendered by browserless.
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('<h1>test</h1>');
$pdf = new Browserless('your-api-key');
$pdf->renderContent('<h1>test</h1>');Examples
Some examples can be found in the examples folder.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
