PHPackages                             kykint/php-weasyprint - 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. kykint/php-weasyprint

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

kykint/php-weasyprint
=====================

PHP library allowing PDF generation from an url or a html page. Wrapper for Kozea/WeasyPrint.

0.11.1(4y ago)030MITPHPPHP ^7.2.0

Since Jul 16Pushed 4y agoCompare

[ Source](https://github.com/kykint/php-weasyprint)[ Packagist](https://packagist.org/packages/kykint/php-weasyprint)[ RSS](/packages/kykint-php-weasyprint/feed)WikiDiscussions main Synced 6d ago

READMEChangelogDependencies (6)Versions (8)Used By (0)

PhpWeasyPrint
=============

[](#phpweasyprint)

This is a fork of [WeasyPrint](https://weasyprint.org/) with support PHP 7.2 (Backport).

PhpWeasyPrint
=============

[](#phpweasyprint-1)

PhpWeasyPrint is a PHP library allowing PDF generation from an URL or an HTML page. It's a wrapper for [WeasyPrint](https://weasyprint.org/), a smart solution helping web developers to create PDF documents, available everywhere Python runs.

You will have to download and install WeasyPrint to use PhpWeasyPrint (version 53 or greater is recommended).

This library is massively inspired by [KnpLabs/snappy](https://github.com/KnpLabs/snappy), of which it aims to be a one-to-one substitute (`GeneratorInterface` is the same). See "[Differences with Snappy](#differences-with-snappy)" section to see how the two differs

Installation using [Composer](http://getcomposer.org/)
------------------------------------------------------

[](#installation-using-composer)

```
$ composer require kykint/php-weasyprint
```

Usage
-----

[](#usage)

### Initialization

[](#initialization)

```
