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

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

kikusempai/mpdf
===============

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

v7.0.0.2(9y ago)01.7k1GPL-2.0PHPPHP ^5.6 || ~7.0.0 || ~7.1.0

Since Nov 20Pushed 9y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (8)Versions (28)Used By (1)

mPDF is a PHP libraray 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 or on Packagist, 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 || ~7.1.0`. PHP `mbstring` and `gd` extensions have to be loaded.

Additional extensions may be required for some advanced features such as `zlib` for compression of output and embedded resources such as fonts, `bcmath` for generating barcodes or `xml` for character set conversion and SVG handling.

Support us
==========

[](#support-us)

Consider supporting development of mPDF with a donation of any value. [Donation button](https://mpdf.github.io) can be found on the [main page of the documentation](https://mpdf.github.io).

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 (since version 7.0) of the library would be as follows:

```
