mPDF Manual – About mPDF

Requirements v7+

Since mPDF 7.0 requires:

  • PHP ≥ 5.6.0 and < 7.4.0.
  • PHP 7.3 is supported since mPDF v7.1.7
  • PHP 7.4 is supported since mPDF v8.0.4
  • PHP mbstring (including mbregex, which needs to be explicitly enabled in some environments) and gd extensions have to be loaded.

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 or xml for character set conversion and SVG handling.

mPDF is not compatible with PHP function overloading (mbstring.func_overload)

As for importing existing PDF files with FPDI, PHP requires zlib extension for compression.

curl extension is used for remote HTTP calls when available.

mPDF has some problems with fetching external HTTP resources with single threaded servers such as php -S. A proper server such as nginx (php-fpm) or Apache is recommended.

For requirements of versions < 7.x see dedicated page

Fork me on GitHub