Since mPDF 7.0 is compatible with these PHP versions:
PHP >=5.6 <7.3.0is supported for
mPDF >= 7.0
PHP 7.3is supported since
PHP 7.4is supported since
PHP 8.0is supported since
PHP 8.1is supported as of
PHP 8.2is supported as of
PHP extensions required, partially required or recommended:
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
zlibfor compression of embedded resources such as fonts or for importing existing PDF files with FPDI
bcmathfor generating barcodes
xmlfor character set conversion and SVG handling.
curlextension is used for remote HTTP calls if available.
mPDF is not compatible with PHP function overloading (
mPDF has issues 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 the dedicated page