Since mPDF 7.0 requires:
- PHP ≥ 5.6.0 and < 7.4.0.
- PHP 7.3 is supported since mPDF
- PHP 7.4 is supported since mPDF
mbregex, which needs to be explicitly enabled in some environments) and
gdextensions 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 (
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