PHPackages                             inspiredminds/contao-pdf-generation - 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. inspiredminds/contao-pdf-generation

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

inspiredminds/contao-pdf-generation
===================================

Allows you to create a PDF for a complete Contao page.

2.0.1(3mo ago)2197LGPL-3.0-or-laterPHPPHP &gt;=8.2

Since Dec 4Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/inspiredminds/contao-pdf-generation)[ Packagist](https://packagist.org/packages/inspiredminds/contao-pdf-generation)[ Docs](https://github.com/inspiredminds/contao-pdf-generation)[ GitHub Sponsors](https://github.com/sponsors/fritzmg)[ RSS](/packages/inspiredminds-contao-pdf-generation/feed)WikiDiscussions main Synced today

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

[![](https://camo.githubusercontent.com/9bebd6439579c2d265ee836311f0be01b8d186c771e67bc4370bc7b3e0fd865d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e7370697265646d696e64732f636f6e74616f2d7064662d67656e65726174696f6e2e737667)](https://packagist.org/packages/inspiredminds/contao-pdf-generation)[![](https://camo.githubusercontent.com/b7fdc33df3786fe776d5ea81f392b5fa568a0fa3ca6288253a4d24e582d8bc80/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e7370697265646d696e64732f636f6e74616f2d7064662d67656e65726174696f6e2e737667)](https://packagist.org/packages/inspiredminds/contao-pdf-generation)

Contao PDF Generation
=====================

[](#contao-pdf-generation)

This allows generating PDF files from regular Contao pages via the [mPDF](https://mpdf.github.io/) PDF generator.

Usage
-----

[](#usage)

First you need to create a PDF generation configuration. If you only need the default settings, the following would suffice for example:

```
contao_pdf_generation:
    configurations:
        my_pdf_config: ~
```

To use a PDF template, you can define the absolute path to the template like this for example:

```
contao_pdf_generation:
    configurations:
        my_pdf_config:
            pdf_template: '%kernel.project_dir%/files/pdf/my_pdf_template.pdf'
```

To integrate a custom font, you also need to define the absolute path to the font files:

```
contao_pdf_generation:
    configurations:
        my_pdf_config:
            fonts:
                default_font: foobar
                custom_fonts:
                    foobar:
                        R: '%kernel.project_dir%/files/pdf/Foobar-Regular.ttf'
                        B: '%kernel.project_dir%/files/pdf/Foobar-Bold.ttf'
```

check the output of `config:dump-reference contao_pdf_generation` for more options.

Next you will have to select a PDF generation configuration in your Contao page layout. You can find this in the *Expert settings* tab of your layout under **PDF generation configuration**. Only pages with a valid PDF generation configuration layout will be able to actually generate a PDF.

Next you will have to create a *Generate PDF* content element. This element will output a form with a submit button that will trigger the PDF generation for the current page. Insert this element then either in your layout, or directly in your content somewhere.

Note

If you need support for default layouts, install version **1.x** of this extension.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance82

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~121 days

Total

5

Last Release

93d ago

Major Versions

1.x-dev → 2.0.02026-03-10

PHP version history (2 changes)1.0.0PHP &gt;=8.1

2.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/25f6ec05570f72d0fcc4d0a4fef2309799d53badf8b30484284e73724661e0d8?d=identicon)[fritzmg](/maintainers/fritzmg)

---

Top Contributors

[![fritzmg](https://avatars.githubusercontent.com/u/4970961?v=4)](https://github.com/fritzmg "fritzmg (9 commits)")

### Embed Badge

![Health badge](/badges/inspiredminds-contao-pdf-generation/health.svg)

```
[![Health](https://phpackages.com/badges/inspiredminds-contao-pdf-generation/health.svg)](https://phpackages.com/packages/inspiredminds-contao-pdf-generation)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M387](/packages/easycorp-easyadmin-bundle)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k251.7M11.6k](/packages/symfony-framework-bundle)

PHPackages © 2026

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