PHPackages                             obtao/html2pdf-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. obtao/html2pdf-bundle

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

obtao/html2pdf-bundle
=====================

This Bundle allows you to generate pdf files into a Symfony2 project.

27.3k1PHP

Since Feb 6Pushed 12y ago1 watchersCompare

[ Source](https://github.com/obtao/Html2PdfBundle)[ Packagist](https://packagist.org/packages/obtao/html2pdf-bundle)[ RSS](/packages/obtao-html2pdf-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Html2PdfBundle
==============

[](#html2pdfbundle)

This bundle makes it very easy (and fun?) to generate PDF files in your Symfony2 project. This bundle is based on the version 4.03 of the [HTML2PDF library](http://html2pdf.fr/en) which uses the version 5.0.002 of the [TCPDF library](http://www.tcpdf.org/)

The **Bundle is heavy** but it already contains HTML2PDF and TCPDF libraries which are heavy. If you can install whatever you want on your server, **we suggest you use the [KnpSnappyBundle](https://github.com/KnpLabs/KnpSnappyBundle)** which is light and nice, but it requires the wkhtmltopdf library to be installed on your server.

Moreover, the HTML2PDF library **is not perfect** and some css rules are not supported. So, whenever possible, **consider using the great KnpSnappyBundle**.

[![Build Status](https://camo.githubusercontent.com/b8ef32c7fdd5fcefac2a821d35cfed500c9a68e13e87717da632cc7463a60d9a/68747470733a2f2f6170692e7472617669732d63692e6f72672f6f6274616f2f48746d6c3250646642756e646c652e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/obtao/Html2PdfBundle)

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

[](#installation-using-composer)

Add to your `composer.json`:

```
{
    "require" :  {
        "obtao/html2pdf-bundle": "master-dev"
    }
}
```

Usage
-----

[](#usage)

Then register it normally in you app/AppKernel.php :

```
  // ...
  new Obtao\Bundle\Html2PdfBundle\ObtaoHtml2PdfBundle(),
```

```
