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

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

xmarcos/php-weasyprint
======================

Backport of pontedilana/php-weasyprint for legacy applications running PHP 5.6.

v0.1.0(3y ago)213MITPHPPHP ^5.6CI failing

Since Aug 17Pushed 3y agoCompare

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

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

PhpWeasyPrint for PHP 5.6
=========================

[](#phpweasyprint-for-php-56)

[![CI Status](https://github.com/xmarcos/php-weasyprint/actions/workflows/ci.yaml/badge.svg)](https://github.com/xmarcos/php-weasyprint/actions/workflows/ci.yaml)[![Latest Stable Version](https://camo.githubusercontent.com/403edcedb75f226f332e32ad17c2078680addf4a5fa121351ae2313d4904acc5/687474703a2f2f706f7365722e707567782e6f72672f786d6172636f732f7068702d77656173797072696e742f76)](https://packagist.org/packages/xmarcos/php-weasyprint)[![Total Downloads](https://camo.githubusercontent.com/37273ee945bf01f2424a7724768882a7b9b822a6f92f5ebd21451a23f288d49c/687474703a2f2f706f7365722e707567782e6f72672f786d6172636f732f7068702d77656173797072696e742f646f776e6c6f616473)](https://packagist.org/packages/xmarcos/php-weasyprint)[![License](https://camo.githubusercontent.com/b0f347063e372d048bdc88b15cfe326a364ad1d58e10504ec2b09f6a6ce48ccf/687474703a2f2f706f7365722e707567782e6f72672f786d6172636f732f7068702d77656173797072696e742f6c6963656e7365)](https://packagist.org/packages/xmarcos/php-weasyprint)[![PHP Version Require](https://camo.githubusercontent.com/50e13f329e6c6f9d3bc4673126781f54dc409ea518e10fd457d70a80c8f5ce1e/687474703a2f2f706f7365722e707567782e6f72672f786d6172636f732f7068702d77656173797072696e742f726571756972652f706870)](https://packagist.org/packages/xmarcos/php-weasyprint)

PhpWeasyPrint is a wrapper for [WeasyPrint](https://weasyprint.org), an alternative to [wkhtmltopdf](https://wkhtmltopdf.org).

⚠️ This is a backport of [`pontedilana/php-weasyprint`](https://github.com/pontedilana/php-weasyprint) for legacy applications running PHP 5.6 —which have reached end-of-life and should not be used in production.

This original 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). Checkout its [README](https://github.com/pontedilana/php-weasyprint/blob/main/README.md) for more information.

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

[](#installation)

```
composer require xmarcos/php-weasyprint
```

> You need to have WeasyPrint installed and available in your path as well.

Usage
-----

[](#usage)

### Initialization

[](#initialization)

```
