PHPackages                             mikemix/dompdfmodule - 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. mikemix/dompdfmodule

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

mikemix/dompdfmodule
====================

DOMPDF Zend Framework lightweight module

3.0.0(9y ago)013.3k↓82.3%3[1 PRs](https://github.com/mikemix/dompdfmodule/pulls)PHPPHP ^5.5 || ^7.0

Since Nov 3Pushed 3y agoCompare

[ Source](https://github.com/mikemix/dompdfmodule)[ Packagist](https://packagist.org/packages/mikemix/dompdfmodule)[ Docs](https://www.phpcontext.com)[ RSS](/packages/mikemix-dompdfmodule/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

dompdfmodule
============

[](#dompdfmodule)

DOMPDF library wrapper as lightweight ZF2/ZF3 module.

[![Build Status](https://camo.githubusercontent.com/cb0ef9a7790f8f42ac41e800f8e87670a762de94b21580ce6cc550b7454e5a5a/68747470733a2f2f7472617669732d63692e6f72672f6d696b656d69782f646f6d7064666d6f64756c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mikemix/dompdfmodule)

Requirements
------------

[](#requirements)

- [Zend Framework 2 or 3](https://framework.zend.com/)

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

[](#installation)

Installation of DOMPDFModule uses PHP Composer. For more information about PHP Composer, please visit the official [PHP Composer site](http://getcomposer.org/).

#### Installation steps

[](#installation-steps)

1. `cd my/project/directory`
2. create a `composer.json` file with following contents:

    ```
    {
        "require": {
            "mikemix/dompdfmodule": "^3.0"
        }
    }
    ```
3. install PHP Composer via `curl -s http://getcomposer.org/installer | php` (on windows, download  and execute it with PHP)
4. run `php composer.phar install`
5. open `my/project/directory/config/application.config.php` and add the following key to your `modules`:

    ```
    'dompdfmodule',
    ```

#### Configuration options

[](#configuration-options)

You can override default options via the `dompdf` key in your local or global config files. See the [dompdfmoule\\Service\\dompdfFactory.php](https://github.com/mikemix/dompdfmodule/blob/master/src/dompdfmodule/Service/dompdfFactory.php#L39) file for the list of default settings.

Full list of possible settings is available at the official [DOMPDF library](https://github.com/dompdf/dompdf) site.

#### Example usage

[](#example-usage)

> Side note: use of `getServiceLocator()` in the controller is deprecated since in ZF3. Make sure you create your controller via a factory and inject the Dompdf object in the constructor.

```
