PHPackages                             massive/pdf-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. massive/pdf-bundle

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

massive/pdf-bundle
==================

The Massive Bundle for managing pdf documents

0.4.3(1y ago)116.9k41MITPHPPHP &gt;=5.4

Since Sep 24Pushed 1y ago22 watchersCompare

[ Source](https://github.com/massiveart/MassivePdfBundle)[ Packagist](https://packagist.org/packages/massive/pdf-bundle)[ RSS](/packages/massive-pdf-bundle/feed)WikiDiscussions 0.4 Synced today

READMEChangelog (7)Dependencies (8)Versions (9)Used By (1)

MassivePdfBundle
================

[](#massivepdfbundle)

Built upon KnpSnappyBundle:

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

[](#installation)

**Install the bundle with composer.**

```
composer require massive/pdf-bundle
```

**Add bundle to your symfony kernel.**

```
new Knp\Bundle\SnappyBundle\KnpSnappyBundle(),
new Massive\Bundle\PdfBundle\MassivePdfBundle(),
```

### Install wkhtmltopdf

[](#install-wkhtmltopdf)

**Ubuntu**

```
apt-get install wkhtmltopdf
apt-get install xvfb
echo ‘xvfb-run –server-args=”-screen 0, 1024x768x24″ /usr/bin/wkhtmltopdf $*’ > /usr/bin/wkhtmltopdf.sh
chmod a+x /usr/bin/wkhtmltopdf.sh
ln -s /usr/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf
wkhtmltopdf http://www.google.com output.pdf

```

**MacOSX**

### Configure Knp Snappy Bundle\*\*

[](#configure-knp-snappy-bundle)

See [KnpSnappyBundle](https://github.com/KnpLabs/KnpSnappyBundle#configuration) for configuration.

Usage
-----

[](#usage)

**Controller Trait**

The controller trait is the easiest way to generate a pdf:

```
