PHPackages                             phihuynh/html2pdfbundle - 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. phihuynh/html2pdfbundle

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

phihuynh/html2pdfbundle
=======================

Use HTML2PDF as a Symfony Service

09PHPCI failing

Since Apr 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/phihuyn/Html2pdfBundle)[ Packagist](https://packagist.org/packages/phihuynh/html2pdfbundle)[ RSS](/packages/phihuynh-html2pdfbundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Html2pdfBundle
==============

[](#html2pdfbundle)

[![SensioLabsInsight](https://camo.githubusercontent.com/395887cb5b823eebb1492563d8318a0c7b4eee0a3aa94942032c7964f7858980/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f30653136623639362d306461332d346566632d623835362d3630343239613936373262342f6d696e692e706e67)](https://insight.sensiolabs.com/projects/0e16b696-0da3-4efc-b856-60429a9672b4)[![Build Status](https://camo.githubusercontent.com/b71f6de5f38e3ea22c75279dda730637769c74370b56331b4a0ecf2b5a5d15f5/68747470733a2f2f7472617669732d63692e6f72672f4f776c79436f64652f456e736570617248746d6c3270646642756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/OwlyCode/EnseparHtml2pdfBundle)

Html2pdf for Symfony 4 or 5 as a service.

How to install ?
----------------

[](#how-to-install-)

Just add this to your composer.json file:

```
"require": {
  ...
  "phihuynh/html2pdfbundle": "dev-master",
}
```

How to use ?
------------

[](#how-to-use-)

In your action:

```
use Ensepar\Html2pdfBundle\Factory\Html2pdfFactory;

public function yourAction(Request $request, Html2pdfFactory $html2pdfFactory){
  ...
  $html2pdf = $html2pdfFactory->create();
}
```

You can pass every option you would pass to html2pdf, for instance :

```
$html2pdf = $html2pdfFactory->create('P', 'A4', 'en', true, 'UTF-8', array(10, 15, 10, 15));

```

How to run the tests ?
----------------------

[](#how-to-run-the-tests-)

```
composer install
phpunit

```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fff0a2aa2319d1fed8d479c512de9c9d2c1b0bbf76aa3fdfe4e21e99ec9906e?d=identicon)[phi\_h](/maintainers/phi_h)

---

Top Contributors

[![phihuyn](https://avatars.githubusercontent.com/u/53585110?v=4)](https://github.com/phihuyn "phihuyn (10 commits)")

### Embed Badge

![Health badge](/badges/phihuynh-html2pdfbundle/health.svg)

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

###  Alternatives

[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.2k57.6M131](/packages/openspout-openspout)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)[setasign/tfpdf

This class is a modified version of FPDF that adds UTF-8 support. The latest version is based on FPDF 1.85.

426.1M30](/packages/setasign-tfpdf)[aspera/xlsx-reader

Spreadsheet reader library for XLSX files

52742.2k5](/packages/aspera-xlsx-reader)

PHPackages © 2026

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