PHPackages                             vladmeh/zf2-tcpdf - 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. vladmeh/zf2-tcpdf

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

vladmeh/zf2-tcpdf
=================

A Zend Framework 2 module for incorporating TCPDF support.

2724PHP

Since Dec 27Pushed 9y ago1 watchersCompare

[ Source](https://github.com/vladmeh/zf2-tcpdf)[ Packagist](https://packagist.org/packages/vladmeh/zf2-tcpdf)[ RSS](/packages/vladmeh-zf2-tcpdf/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

TCPDFModule
===========

[](#tcpdfmodule)

A Zend Framework 2 module for incorporating TCPDF support.

*[for Zend Framework 3](https://github.com/vladmeh/zf3-tcpdf)*

[![Build Status](https://camo.githubusercontent.com/34256138ff78396119df01f1834defd95ad576e1a1e52257200151cd5344b819/68747470733a2f2f7472617669732d63692e6f72672f766c61646d65682f7a66322d74637064662e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/vladmeh/zf2-tcpdf)

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

[](#requirements)

- Zend Faramework 2 (version 2.5 and later)

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

[](#installation)

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

#### Installation steps

[](#installation-steps)

`php composer.phar require vladmeh/zf2-tcpdf:dev-master`

or

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

    ```
     {
         "require": {
             "vladmeh/zf2-tcpdf": "dev-master"
         }
     }

    ```
3. install PHP Composer via curl -s  | 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:

    ```
    'TCPDFModule',

    ```

#### 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 TCPDF object in the constructor. [Migration Guide](http://zendframework.github.io/zend-servicemanager/migration/#factories)([ZF3 to use the new version](https://github.com/vladmeh/zf3-tcpdf))

```
// module config: module\Application\config\module.config.php
