PHPackages                             niklasravnsborg/mpdf - 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. niklasravnsborg/mpdf

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

niklasravnsborg/mpdf
====================

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

v6.1.0(10y ago)02.9k1GPL-2.0PHPPHP &gt;=5.3.2

Since Nov 20Pushed 10y ago1 watchersCompare

[ Source](https://github.com/niklasravnsborg/mpdf)[ Packagist](https://packagist.org/packages/niklasravnsborg/mpdf)[ Docs](http://www.mpdf1.com/mpdf/index.php)[ RSS](/packages/niklasravnsborg-mpdf/feed)WikiDiscussions development Synced 1mo ago

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

mPDF is a PHP class which generates PDF files from UTF-8 encoded HTML. It is based on [FPDF](http://www.fpdf.org/)and [HTML2FPDF](http://html2fpdf.sourceforge.net/) (see [CREDITS](CREDITS.txt)), with a number of enhancements. mPDF was written by Ian Back and is released under the [GNU GPL v2 licence](LICENSE.txt).

[![Build Status](https://camo.githubusercontent.com/de0221c162edf47485883569d2a8a348f9bcd204272c99938bf84cdde7ba8c70/68747470733a2f2f7472617669732d63692e6f72672f6d7064662f6d7064662e7376673f6272616e63683d646576656c6f706d656e74)](https://travis-ci.org/mpdf/mpdf)

Installation
============

[](#installation)

Preferred installation method is via composer and its packagist package [mpdf/mpdf](https://packagist.org/packages/mpdf/mpdf).

Manual installation
-------------------

[](#manual-installation)

- Download the [.zip release file](https://github.com/mpdf/mpdf/releases) and unzip it
- Create a folder e.g. /mpdf on your server
- Upload all of the files to the server, maintaining the folders as they are
- Ensure that you have write permissions set (CHMOD 6xx or 7xx) for the following folders:

    /ttfontdata/ - used to cache font data; improves performance a lot

    /tmp/ - used for some images and ProgressBar

    /graph\_cache/ - if you are using [JpGraph](http://jpgraph.net) in conjunction with mPDF

To test the installation, point your browser to the basic example file:

```
[path_to_mpdf_folder]/mpdf/examples/example01_basic.php

```

If you wish to define a different folder for temporary files rather than /tmp/ see the note on [Folder for temporary files](https://mpdf.github.io/indexec16.html?tid=445)in the section on Installation &amp; Setup in the [manual](https://mpdf.github.io/).

If you have problems, please read the section on [troubleshooting](https://mpdf.github.io/index1dbe.html?tid=32) in the manual.

Online manual
=============

[](#online-manual)

Online manual is available at .

Unit Testing
============

[](#unit-testing)

Unit testing for mPDF is done using [PHPUnit](https://phpunit.de/).

To get started, run `composer install` from the command line while in the mPDF root directory (you'll need [composer installed first](https://getcomposer.org/download/)).

To execute tests, run `vendor/bin/phpunit` from the command line while in the mPDF root directory.

Any assistance writing unit tests for mPDF is greatly appreciated. If you'd like to help, please note that any PHP file located in the `/tests/` directory will be autoloaded when unit testing.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 58.1% 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 ~86 days

Recently: every ~95 days

Total

15

Last Release

3709d ago

Major Versions

v5.7.1 → v6.0-beta2014-01-07

v5.7.4a → v6.0.02015-03-01

6.1.x-dev → 7.0.x-dev2015-06-17

PHP version history (2 changes)v5.5.1PHP &gt;=4.3.10

v6.1.0PHP &gt;=5.3.2

### Community

Maintainers

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

---

Top Contributors

[![finwe](https://avatars.githubusercontent.com/u/195675?v=4)](https://github.com/finwe "finwe (43 commits)")[![danielhjames](https://avatars.githubusercontent.com/u/1867708?v=4)](https://github.com/danielhjames "danielhjames (5 commits)")[![TomK](https://avatars.githubusercontent.com/u/299656?v=4)](https://github.com/TomK "TomK (4 commits)")[![dundee](https://avatars.githubusercontent.com/u/27106?v=4)](https://github.com/dundee "dundee (4 commits)")[![fglueck](https://avatars.githubusercontent.com/u/3225774?v=4)](https://github.com/fglueck "fglueck (2 commits)")[![jakejackson1](https://avatars.githubusercontent.com/u/2918419?v=4)](https://github.com/jakejackson1 "jakejackson1 (2 commits)")[![ram4nd](https://avatars.githubusercontent.com/u/1172207?v=4)](https://github.com/ram4nd "ram4nd (2 commits)")[![niklasravnsborg](https://avatars.githubusercontent.com/u/6717303?v=4)](https://github.com/niklasravnsborg "niklasravnsborg (1 commits)")[![palmic](https://avatars.githubusercontent.com/u/11916?v=4)](https://github.com/palmic "palmic (1 commits)")[![PATROMO](https://avatars.githubusercontent.com/u/318564?v=4)](https://github.com/PATROMO "PATROMO (1 commits)")[![Seldaek](https://avatars.githubusercontent.com/u/183678?v=4)](https://github.com/Seldaek "Seldaek (1 commits)")[![SilverFire](https://avatars.githubusercontent.com/u/4499203?v=4)](https://github.com/SilverFire "SilverFire (1 commits)")[![Verron](https://avatars.githubusercontent.com/u/1887313?v=4)](https://github.com/Verron "Verron (1 commits)")[![heldchen](https://avatars.githubusercontent.com/u/299636?v=4)](https://github.com/heldchen "heldchen (1 commits)")[![jamescarlos](https://avatars.githubusercontent.com/u/21432?v=4)](https://github.com/jamescarlos "jamescarlos (1 commits)")[![JanSlabon](https://avatars.githubusercontent.com/u/12390057?v=4)](https://github.com/JanSlabon "JanSlabon (1 commits)")[![jdufresne](https://avatars.githubusercontent.com/u/347634?v=4)](https://github.com/jdufresne "jdufresne (1 commits)")[![marclaporte](https://avatars.githubusercontent.com/u/1004261?v=4)](https://github.com/marclaporte "marclaporte (1 commits)")[![mgersten-caxy](https://avatars.githubusercontent.com/u/4094087?v=4)](https://github.com/mgersten-caxy "mgersten-caxy (1 commits)")

---

Tags

phppdfutf-8

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/niklasravnsborg-mpdf/health.svg)

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

###  Alternatives

[mpdf/mpdf

PHP library generating PDF files from UTF-8 encoded HTML

4.7k77.1M490](/packages/mpdf-mpdf)

PHPackages © 2026

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