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

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

umertasov/mpdf
==============

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

v7.0.19(8y ago)0204[1 PRs](https://github.com/umertasov/mpdf/pulls)1GPL-2.0PHPPHP &gt;=5.4.0

Since Nov 20Pushed 8y ago2 watchersCompare

[ Source](https://github.com/umertasov/mpdf)[ Packagist](https://packagist.org/packages/umertasov/mpdf)[ Docs](http://mpdf.github.io)[ RSS](/packages/umertasov-mpdf/feed)WikiDiscussions development Synced 2mo ago

READMEChangelog (10)Dependencies (2)Versions (48)Used By (1)

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)

> Note: If you are viewing this file on mPDF Github repository homepage, please note that the default repository branch is `development` which can differ from the last stable release.

Requirements
============

[](#requirements)

mPDF 7.0 requires PHP `^5.6 || ~7.0.0`. PHP `mbstring` and `gd` extensions have to be loaded.

PHP `~7.1.0` *should* be compatible.

Additional extensions may be required for some advanced features such as `zlib` for compression of embedded resources such as fonts or `bcmath` for generating barcodes.

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

[](#installation)

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

```
$ composer require mpdf/mpdf

```

Usage
=====

[](#usage)

The simplest usage of the library would be as follows:

```
