PHPackages                             qipsius/tcpdf-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. qipsius/tcpdf-bundle

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

qipsius/tcpdf-bundle
====================

A bundle to easily integrate TCPDF into Symfony

4.0.0(4mo ago)22709.1k—8.4%4MITPHPPHP &gt;=8.4

Since Jun 18Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/Qipsius/QipsiusTCPDFBundle)[ Packagist](https://packagist.org/packages/qipsius/tcpdf-bundle)[ Docs](https://github.com/qipsius/QipsiusTCPDFBundle)[ RSS](/packages/qipsius-tcpdf-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (18)Used By (0)

QipsiusTCPDFBundle
==================

[](#qipsiustcpdfbundle)

This bundle is a fork of [WhiteOctoberTCPDFBundle](https://github.com/whiteoctober/WhiteOctoberTCPDFBundle)This bundle facilitates easy use of the TCPDF PDF generation library in Symfony &gt;= 6.0 applications.

For Symfony versions older than 6 use the 2.0 branch

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

[](#installation)

### Step 1: Setup Bundle and dependencies

[](#step-1-setup-bundle-and-dependencies)

```
composer require qipsius/tcpdf-bundle

```

#### Version constraining (optional)

[](#version-constraining-optional)

By default, this bundle does not constrain the version of TCPDF that composer installs. ([An explanation of this unusual decision is here](https://github.com/whiteoctober/WhiteOctoberTCPDFBundle/issues/53)). This means that a `composer update` could update to a new major version of TCPDF. Since this bundle is only a thin wrapper around TCPDF, you can normally do such an upgrade without issue.

However, if you do wish to constrain the TCPDF version, find out what version you currently have installed with:

```
composer show tecnickcom/tcpdf
```

And amend your project's `composer.json` to add a TCPDF version constraint in the `requires` section. For example, if TCPDF version `6.6.5` was installed, `"tecnickcom/tcpdf": "^6.6.5"` will allow anything &lt; 7 when upgrading.

### Step 2: Enable the bundle in the kernel

[](#step-2-enable-the-bundle-in-the-kernel)

Add the bundle to the `registerBundles()` method in your kernel:

```
// config/bundles.php
return [
    // ...
    Qipsius\TCPDFBundle\QipsiusTCPDFBundle::class => ['all' => true],
    // ...
];
```

(This project is not yet configured with Symfony Flex, so this change to `config/bundles.php` won't be done automatically.)

If you want to do service autowiring, you'll need to add an alias for the service:

```
# config/services.yaml

services:
    # ...

    # the `qipsius.tcpdf` service will be injected when a
    # `Qipsius\TCPDFBundle\Controller\TCPDFController` type-hint is detected
    Qipsius\TCPDFBundle\Controller\TCPDFController: '@qipsius.tcpdf'
```

Using TCPDF
-----------

[](#using-tcpdf)

You can inject the `TCPDFController` service into your class

```
use Qipsius\TCPDFBundle\Controller\TCPDFController;

class PDFService
{
    protected TCPDFController $tcpdf;

    public function __construct(TCPDFController $tcpdf)
    {
        $this->tcpdf = $tcpdf;
    }

   ...
}
```

From hereon in, you are using a TCPDF object to work with as normal.

Configuration
-------------

[](#configuration)

### Configuration values

[](#configuration-values)

You can pass parameters to TCPDF like this:

```
# config/packages/qipsius_tcpdf.yaml

qipsius_tcpdf:
    tcpdf:
        k_title_magnification: 2
```

You can see the default parameter values in `Qipsius\TCPDFBundle\DependencyInjection\Configuration::addTCPDFConfig`.

If you want, you can use TCPDF's own defaults instead:

```
# config/packages/qipsius_tcpdf.yaml

qipsius_tcpdf:
    tcpdf:
        k_tcpdf_external_config: false  # the values set by this bundle will be ignored
```

### Using a custom class

[](#using-a-custom-class)

If you want to use your own custom TCPDF-based class, you can use the `class` parameter in your configuration:

```
# config/packages/qipsius_tcpdf.yaml

qipsius_tcpdf:
    class: '\App\Services\TCPDFService'
```

The class must extend from the `TCPDF` class; an exception will be thrown if this is not the case.

License
-------

[](#license)

This bundle is under the MIT license. See the complete license in the bundle:

```
Resources/meta/LICENSE

```

Contributing
------------

[](#contributing)

We welcome contributions to this project, including pull requests and issues (and discussions on existing issues).

If you'd like to contribute code but aren't sure what, the [issues list](https://github.com/Qipsius/QipsiusTCPDFBundle/issues) is a good place to start. If you're a first-time code contributor, you may find Github's guide to [forking projects](https://guides.github.com/activities/forking/) helpful.

All contributors (whether contributing code, involved in issue discussions, or involved in any other way) must abide by our [code of conduct](https://github.com/Qipsius/open-source-code-of-conduct/blob/master/code_of_conduct.md).

###  Health Score

63

—

FairBetter than 99% of packages

Maintenance75

Regular maintenance activity

Popularity47

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~286 days

Recently: every ~204 days

Total

17

Last Release

135d ago

Major Versions

1.1.2 → 2.0.02019-12-06

2.0.3 → 3.0.02023-10-09

2.0.x-dev → 3.0.52024-08-17

3.0.5 → 4.0.02026-01-03

PHP version history (4 changes)1.0.0PHP &gt;=5.3.2

2.0.0PHP &gt;=7.1

3.0.0PHP &gt;=8.1

4.0.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/a305b16460f730ce0d89629b6fe41fa0099658996f68a0fe3862a18bcd88c16a?d=identicon)[davnavarro](/maintainers/davnavarro)

---

Top Contributors

[![richsage](https://avatars.githubusercontent.com/u/231551?v=4)](https://github.com/richsage "richsage (27 commits)")[![davnavarro](https://avatars.githubusercontent.com/u/20243450?v=4)](https://github.com/davnavarro "davnavarro (19 commits)")[![jacobmaster](https://avatars.githubusercontent.com/u/696980?v=4)](https://github.com/jacobmaster "jacobmaster (2 commits)")[![tvlooy](https://avatars.githubusercontent.com/u/391674?v=4)](https://github.com/tvlooy "tvlooy (2 commits)")[![raziel057](https://avatars.githubusercontent.com/u/652505?v=4)](https://github.com/raziel057 "raziel057 (2 commits)")[![SvetlinStaevWorldstores](https://avatars.githubusercontent.com/u/17498708?v=4)](https://github.com/SvetlinStaevWorldstores "SvetlinStaevWorldstores (2 commits)")[![senuphtyz](https://avatars.githubusercontent.com/u/2011705?v=4)](https://github.com/senuphtyz "senuphtyz (1 commits)")[![ThomasLandauer](https://avatars.githubusercontent.com/u/1054469?v=4)](https://github.com/ThomasLandauer "ThomasLandauer (1 commits)")[![trinko](https://avatars.githubusercontent.com/u/1807143?v=4)](https://github.com/trinko "trinko (1 commits)")[![yarbu](https://avatars.githubusercontent.com/u/982786?v=4)](https://github.com/yarbu "yarbu (1 commits)")[![zerrvox](https://avatars.githubusercontent.com/u/30272?v=4)](https://github.com/zerrvox "zerrvox (1 commits)")[![zhil](https://avatars.githubusercontent.com/u/981783?v=4)](https://github.com/zhil "zhil (1 commits)")[![DjangoFR](https://avatars.githubusercontent.com/u/4688470?v=4)](https://github.com/DjangoFR "DjangoFR (1 commits)")[![kaspervrind](https://avatars.githubusercontent.com/u/6152478?v=4)](https://github.com/kaspervrind "kaspervrind (1 commits)")[![Osukaru](https://avatars.githubusercontent.com/u/249598?v=4)](https://github.com/Osukaru "Osukaru (1 commits)")[![piotrantosik](https://avatars.githubusercontent.com/u/154553?v=4)](https://github.com/piotrantosik "piotrantosik (1 commits)")[![samnela](https://avatars.githubusercontent.com/u/1852108?v=4)](https://github.com/samnela "samnela (1 commits)")

---

Tags

pdfTCPDF

### Embed Badge

![Health badge](/badges/qipsius-tcpdf-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/qipsius-tcpdf-bundle/health.svg)](https://phpackages.com/packages/qipsius-tcpdf-bundle)
```

###  Alternatives

[elibyy/tcpdf-laravel

tcpdf support for Laravel 6, 7, 8, 9, 10, 11

3542.7M5](/packages/elibyy-tcpdf-laravel)[propa/tcpdi

TCPDI is a PHP class for importing PDF to use with TCPDF

231.1M1](/packages/propa-tcpdi)[bithost-gmbh/pdfviewhelpers

This is a TYPO3 CMS extension that provides various Fluid ViewHelpers to generate PDF documents.

45242.7k2](/packages/bithost-gmbh-pdfviewhelpers)[tarfin-labs/easy-pdf

Makes pdf processing easy.

1718.3k](/packages/tarfin-labs-easy-pdf)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
