PHPackages                             prg/portabledocument-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. prg/portabledocument-bundle

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

prg/portabledocument-bundle
===========================

This bundle to generate PDFs optionally with css styling.

v1.0(11y ago)052MITPHP

Since Jul 23Pushed 11y ago1 watchersCompare

[ Source](https://github.com/pguso/PortableDocumentBundle)[ Packagist](https://packagist.org/packages/prg/portabledocument-bundle)[ Docs](http://github.com/pguso/PortableDocumentBundle)[ RSS](/packages/prg-portabledocument-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

PortableDocumentBundle
======================

[](#portabledocumentbundle)

PortableDocumentBundle is a PHP (5.3+) wrapper for the mPDF Library. It allows you to generate pdfs from html.

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

[](#installation)

With [composer](http://packagist.org), add:

```
{
    "require": {
        "prg/portabledocument-bundle": "dev-master"
    }
}
```

Then enable it in your kernel:

```
// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        //...
        new PRG\PortableDocumentBundle\PRGPortableDocumentBundle(),
        //...
```

### Render a pdf document as response from a controller

[](#render-a-pdf-document-as-response-from-a-controller)

```
$pdfGenerator = $this->get('pguso.mpdf');

$html = $this->renderView('YourBundle:Folder:file.html.twig', array(
            'args' => $args
        ));

return new Response(
          $pdfGenerator->generateFromView($html, array(
                'stylesheet' => '/pdf/style.css' //optional
            ))
        );
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Unknown

Total

1

Last Release

4317d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ecb686c96a6c7a66da245bbff6269fbbe966102abf6d42ce0a4cd39ed8d3b2c?d=identicon)[pguso](/maintainers/pguso)

---

Top Contributors

[![pguso](https://avatars.githubusercontent.com/u/4007140?v=4)](https://github.com/pguso "pguso (3 commits)")

---

Tags

symfonybundlepdf

### Embed Badge

![Health badge](/badges/prg-portabledocument-bundle/health.svg)

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

###  Alternatives

[nucleos/dompdf-bundle

This bundle provides a wrapper for using dompdf inside symfony.

54882.8k1](/packages/nucleos-dompdf-bundle)[sensiolabs/gotenberg-bundle

A Symfony bundle that provides seamless integration with Gotenberg for generating PDFs and screenshots from various sources (HTML, Markdown, Office documents, URLs) with a clean, builder-based API.

210210.4k2](/packages/sensiolabs-gotenberg-bundle)[ensepar/html2pdf-bundle

Use HTML2PDF as a Symfony Service

27669.3k](/packages/ensepar-html2pdf-bundle)[spraed/pdf-generator-bundle

This bundle creates (multiple) PDFs in Symfony from Twig/HTML templates.

52516.3k](/packages/spraed-pdf-generator-bundle)[onurb/excel-bundle

Symfony Bundle to read or write Excel file (including pdf, xlsx, odt), using phpoffice/phpspreadsheet library (replacement of phpoffice/phpexcel, abandonned)

15332.0k](/packages/onurb-excel-bundle)

PHPackages © 2026

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