PHPackages                             knplabs/knp-snappy-bundle - 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. knplabs/knp-snappy-bundle

ActiveSymfony-bundle[PDF &amp; Document Generation](/categories/documents)

knplabs/knp-snappy-bundle
=========================

Easily create PDF and images in Symfony by converting Twig/HTML templates.

v1.10.6(4mo ago)1.2k31.8M—3.5%143[1 issues](https://github.com/KnpLabs/KnpSnappyBundle/issues)20MITPHPPHP &gt;=8.1CI failing

Since Nov 5Pushed 4mo ago52 watchersCompare

[ Source](https://github.com/KnpLabs/KnpSnappyBundle)[ Packagist](https://packagist.org/packages/knplabs/knp-snappy-bundle)[ Docs](http://github.com/KnpLabs/KnpSnappyBundle)[ RSS](/packages/knplabs-knp-snappy-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (24)Used By (20)

KnpSnappyBundle
===============

[](#knpsnappybundle)

[![Build Status](https://github.com/KnpLabs/KnpSnappyBundle/actions/workflows/build.yaml/badge.svg)](https://github.com/KnpLabs/KnpSnappyBundle/actions/workflows/build.yaml/badge.svg)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/727acc2fc5ed600784fd34fef975531c36cfcce1ea21013a9da06259afa375d7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4b6e704c6162732f4b6e70536e6170707942756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/KnpLabs/KnpSnappyBundle/?branch=master)[![StyleCI](https://camo.githubusercontent.com/1ad9998b35da3edaadfbbc0f45e07eb2d043fe3f321d417c0214622389867ee6/68747470733a2f2f7374796c6563692e696f2f7265706f732f3734333231382f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/743218)

[Snappy](https://github.com/KnpLabs/snappy) is a PHP wrapper for the [wkhtmltopdf](http://wkhtmltopdf.org) conversion utility. It allows you to generate either pdf or image files from your html documents, using the webkit engine.

The KnpSnappyBundle provides a simple integration for your Symfony project.

Limitations
-----------

[](#limitations)

If you use JavaScript to render your pages, you may encounter some issues because of [wkhtmltopdf](http://wkhtmltopdf.org) not being fully compatible with ES6 apis. The only way to solve this issue is to provide polyfills that fix the gaps between modern ES6 apis and the [wkhtmltopdf](http://wkhtmltopdf.org) rendering engine.

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

[](#installation)

With [composer](https://getcomposer.org), require:

```
composer require knplabs/knp-snappy-bundle
```

If you are not using Flex, enable it in your kernel :

```
// config/bundles.php
