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(6mo ago)915.2k↓80.6%4[1 issues](https://github.com/kaystrobach/FLOW.Pdf/issues)[1 PRs](https://github.com/kaystrobach/FLOW.Pdf/pulls)PHP

Since Oct 21Pushed 6mo ago1 watchersCompare

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

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

50

—

FairBetter than 95% of packages

Maintenance65

Regular maintenance activity

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

193d 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

27.6k172.1k9](/packages/bagisto-bagisto)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[carlos-meneses/laravel-mpdf

Laravel Mpdf: Using Mpdf in Laravel to generate Pdfs.

4433.4M13](/packages/carlos-meneses-laravel-mpdf)[kartik-v/yii2-mpdf

A Yii2 wrapper component for the mPDF library which generates PDF files from UTF-8 encoded HTML.

1745.7M88](/packages/kartik-v-yii2-mpdf)[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.0M777](/packages/neos-neos)[contributte/pdf

Pdf response extension for Nette Framework

43998.4k4](/packages/contributte-pdf)

PHPackages © 2026

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