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

ActiveNeos-package[PDF &amp; Document Generation](/categories/documents)

kaystrobach/pdf
===============

Convert HTML directly to PDF on the fly, using the mpdf or dompdf library.

6.3.2(7mo ago)915.3k↓81.2%4[1 issues](https://github.com/kaystrobach/FLOW.Pdf/issues)[1 PRs](https://github.com/kaystrobach/FLOW.Pdf/pulls)PHP

Since Oct 21Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/kaystrobach/FLOW.Pdf)[ Packagist](https://packagist.org/packages/kaystrobach/pdf)[ RSS](/packages/kaystrobach-pdf/feed)WikiDiscussions master Synced 2w ago

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

FLOW.Pdf (For the TYPO3 Flow Framework)
=======================================

[](#flowpdf-for-the-typo3-flow-framework)

This Package makes it possible to convert the rendered HTML directly to PDF on the fly, using the mpdf or dompdf library. To achieve the on the fly rendering easily it uses a fluid viewhelper.

You need one of these package installed via composer, the package itself checks if the library is missing and asks you to install it.

- dompdf/dompdf (deprecated)
- mpdf/mpdf

Controller Usage - do not use the viewHelper anymore, stick to the dedicated view!
----------------------------------------------------------------------------------

[](#controller-usage---do-not-use-the-viewhelper-anymore-stick-to-the-dedicated-view)

The recent version of the package contains a new view. This view can be included directly in the controller e.g. like this:

```
class FormulareController extends \Neos\Flow\Mvc\Controller\ActionController {
	/**
	 * @Flow\Inject
	 * @var \SBS\LaPo\Domain\Repository\StudentRepository
	 */
	protected $studentRepository;

	/**
	 * @var array
	 */
	protected $viewFormatToObjectNameMap = array(
		'pdf.html' => 'KayStrobach\Pdf\View\PdfTemplateView'
	);

```

This example uses the format pdf.html to make it easily possible to edit the template files with your favourite IDE.

Example usage in a FLOW Package called Some.Package
---------------------------------------------------

[](#example-usage-in-a-flow-package-called-somepackage)

In a FLOW Layout you can wrap your generated HTML with the following ViewHelper and the output gets transformed into a PDF.

```
{namespace pdf=KayStrobach\Pdf\ViewHelpers}

	some html content

```

The parameter documentation can be obtained from the viewHelper directly see Classes/KayStrobach/Pdf/ViewHelpers/PdfViewHelper.php

A complete example may look like: (Taken from project/Packages/Application/Some.Package/Resources/Private/Layouts/Pdf.html)

```
{namespace pdf=KayStrobach\Pdf\ViewHelpers}

				table {
					border-collapse: collapse;
				}

				table.formblock td{
					border: 0.1mm solid black;
					vertical-align: top;
					padding: 1mm;
					width: 50%;
					height: 8mm;
				}
				table.formblock .halfcell {
					width: 25%;
				}
				table.formblockAbstand {
					margin-top: 5mm;
				}
				.label {
					font-size: 6pt;
				}

```

Defining headers and footers
----------------------------

[](#defining-headers-and-footers)

Place this in the head

```

			@page {
				header: html_Header;
				footer: html_Footer;
			}

```

and something like this in the body:

```

						Seite {PAGENO} von {nbpg} - Ausdruck vom {DATE d.m.Y H:i}

```

Rendering barcodes
------------------

[](#rendering-barcodes)

```

```

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance59

Moderate activity, may be stable

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 96.6% 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 ~194 days

Recently: every ~299 days

Total

22

Last Release

238d ago

Major Versions

0.2.x-dev → 1.0.0-beta12017-08-30

1.0.2 → 2.0.02019-04-25

2.0.0 → 3.02019-05-09

3.0.2 → 4.0.02020-08-17

4.1.x-dev → 6.0.02021-11-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c6681704a769ab93a20ba54d94054d0f3f1e81b99341e8cfa29d91f6d8f16fb?d=identicon)[kaystrobach](/maintainers/kaystrobach)

---

Top Contributors

[![kaystrobach](https://avatars.githubusercontent.com/u/1185776?v=4)](https://github.com/kaystrobach "kaystrobach (86 commits)")[![Sebobo](https://avatars.githubusercontent.com/u/596967?v=4)](https://github.com/Sebobo "Sebobo (2 commits)")[![philsturgeon](https://avatars.githubusercontent.com/u/67381?v=4)](https://github.com/philsturgeon "philsturgeon (1 commits)")

### Embed Badge

![Health badge](/badges/kaystrobach-pdf/health.svg)

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

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

28.0k175.2k9](/packages/bagisto-bagisto)[kimai/kimai

Kimai - Time Tracking

4.8k9.4k1](/packages/kimai-kimai)[neos/neos

An open source Content Application Platform based on Flow. A set of core Content Management features is resting within a larger context that allows you to build a perfectly customized experience for your users.

1151.0M838](/packages/neos-neos)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1617.3k16](/packages/2lenet-crudit-bundle)[neos/media

The Media package

101.2M57](/packages/neos-media)[abydahana/aksara

Aksara is a modern, developer-friendly framework and CMS built on CodeIgniter 4, featuring rapid CRUD development, modular architecture, smart routing, flexible access control, API integration, and an AI assistant to make content management faster and smarter.

1141.2k](/packages/abydahana-aksara)

PHPackages © 2026

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