PHPackages                             spipu/html2pdf - 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. spipu/html2pdf

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

spipu/html2pdf
==============

Html2Pdf is a HTML to PDF converter written in PHP - It uses TCPDF - OFFICIAL PACKAGE

v5.3.3(11mo ago)1.8k10.6M—1.2%747[235 issues](https://github.com/spipu/html2pdf/issues)[3 PRs](https://github.com/spipu/html2pdf/pulls)20OSL-3.0PHPPHP ^7.2 || ^8.0CI passing

Since Dec 11Pushed 11mo ago94 watchersCompare

[ Source](https://github.com/spipu/html2pdf)[ Packagist](https://packagist.org/packages/spipu/html2pdf)[ Docs](http://html2pdf.fr/)[ RSS](/packages/spipu-html2pdf/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (22)Used By (20)Security (2)

Html2Pdf
========

[](#html2pdf)

Html2Pdf is a HTML to PDF converter written in PHP, and compatible with PHP **7.2** to **8.4**.

It allows the conversion of valid HTML in PDF format, to generate documents like invoices, documentation, ...

You have to write specific cleaned HTML code for Html2Pdf. Do not try to convert directly an already existing html page, or HTML code coming from WYSIWYG, no help will be provided in this case.

Specific tags have been implemented, to adapt the html standard to a PDF usage.

You must use Composer to install this library.

It uses TCPDF for the PDF part.

Requirements
------------

[](#requirements)

Html2Pdf works with PHP &gt;7.2 and Composer.

You will also need at least the following php extensions:

- gd
- mbstring

Documentation
-------------

[](#documentation)

You will find the install documentation [here](./doc/install.md).

You will find all the documentation [here](./doc/README.md).

You will find lots of examples [here](./examples).

Donate
------

[](#donate)

You can support this project by making a [donation](http://html2pdf.fr/en/donate).

Change log
----------

[](#change-log)

See the [./CHANGELOG.md](./CHANGELOG.md) file.

Help &amp; Support
------------------

[](#help--support)

For questions and bug reports, please use the GitHub issues page.

License
-------

[](#license)

This program is distributed under the OSL License. For more information see the [./LICENSE.md](./LICENSE.md) file.

Copyright 2008-2025 by Laurent Minguet

###  Health Score

65

—

FairBetter than 99% of packages

Maintenance49

Moderate activity, may be stable

Popularity74

Solid adoption and visibility

Community51

Growing community involvement

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 75.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 ~173 days

Total

21

Last Release

344d ago

Major Versions

v4.6.1 → v5.0.02017-06-15

PHP version history (7 changes)v4.4.0PHP &gt;=5.2

v4.5.0PHP &gt;=5.3.2

v5.0.0PHP ~5.4 || ~7.0

v5.1.0PHP ^5.4 || ^7.0

v5.2.2PHP ^5.6 || ^7.0

v5.2.3PHP ^5.6 || ^7.0 || ^8.0

v5.3.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/e8305ef3c915faf021003df7bac847994c96be96436388323f18bfbae35aa3ef?d=identicon)[spipu](/maintainers/spipu)

---

Top Contributors

[![spipu](https://avatars.githubusercontent.com/u/10595905?v=4)](https://github.com/spipu "spipu (323 commits)")[![juchi](https://avatars.githubusercontent.com/u/3333098?v=4)](https://github.com/juchi "juchi (50 commits)")[![fagundes](https://avatars.githubusercontent.com/u/169477?v=4)](https://github.com/fagundes "fagundes (13 commits)")[![LittleBigFox](https://avatars.githubusercontent.com/u/7079779?v=4)](https://github.com/LittleBigFox "LittleBigFox (5 commits)")[![W0rma](https://avatars.githubusercontent.com/u/20659830?v=4)](https://github.com/W0rma "W0rma (5 commits)")[![coffeemedia](https://avatars.githubusercontent.com/u/1494115?v=4)](https://github.com/coffeemedia "coffeemedia (3 commits)")[![94noni](https://avatars.githubusercontent.com/u/1358361?v=4)](https://github.com/94noni "94noni (2 commits)")[![axi](https://avatars.githubusercontent.com/u/389340?v=4)](https://github.com/axi "axi (2 commits)")[![CWBudde](https://avatars.githubusercontent.com/u/4097562?v=4)](https://github.com/CWBudde "CWBudde (2 commits)")[![noxlux](https://avatars.githubusercontent.com/u/6777021?v=4)](https://github.com/noxlux "noxlux (2 commits)")[![jjsty1e](https://avatars.githubusercontent.com/u/5469845?v=4)](https://github.com/jjsty1e "jjsty1e (1 commits)")[![f-houssait](https://avatars.githubusercontent.com/u/96026287?v=4)](https://github.com/f-houssait "f-houssait (1 commits)")[![kkevinchoo](https://avatars.githubusercontent.com/u/19289875?v=4)](https://github.com/kkevinchoo "kkevinchoo (1 commits)")[![divinity76](https://avatars.githubusercontent.com/u/1874996?v=4)](https://github.com/divinity76 "divinity76 (1 commits)")[![locojohn](https://avatars.githubusercontent.com/u/881947?v=4)](https://github.com/locojohn "locojohn (1 commits)")[![milan-ghevariya](https://avatars.githubusercontent.com/u/163408947?v=4)](https://github.com/milan-ghevariya "milan-ghevariya (1 commits)")[![berengan](https://avatars.githubusercontent.com/u/12462990?v=4)](https://github.com/berengan "berengan (1 commits)")[![OskarStark](https://avatars.githubusercontent.com/u/995707?v=4)](https://github.com/OskarStark "OskarStark (1 commits)")[![Pionell](https://avatars.githubusercontent.com/u/24505446?v=4)](https://github.com/Pionell "Pionell (1 commits)")[![punit5658](https://avatars.githubusercontent.com/u/4838480?v=4)](https://github.com/punit5658 "punit5658 (1 commits)")

---

Tags

html2pdfphppdfhtmlhtml2pdf

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/spipu-html2pdf/health.svg)

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

###  Alternatives

[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3685.2M19](/packages/gotenberg-gotenberg-php)[spiritix/php-chrome-html2pdf

A PHP library for converting HTML to PDF using Google Chrome

153472.0k3](/packages/spiritix-php-chrome-html2pdf)[elibyy/tcpdf-laravel

tcpdf support for Laravel 6, 7, 8, 9, 10, 11

3542.7M5](/packages/elibyy-tcpdf-laravel)[kartik-v/yii2-mpdf

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

1605.5M84](/packages/kartik-v-yii2-mpdf)[kartik-v/yii2-export

A library to export server/db data in various formats (e.g. excel, html, pdf, csv etc.)

1623.1M35](/packages/kartik-v-yii2-export)[danielboendergaard/phantom-pdf

A Package for generating PDF files using PhantomJS

72467.9k](/packages/danielboendergaard-phantom-pdf)

PHPackages © 2026

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