Requirements v7+
Since mPDF 7.0 is compatible with these PHP versions:
PHP >=5.6 <7.3.0is supported formPDF >= 7.0PHP 7.3is supported sincemPDF v7.1.7PHP 7.4is supported sincemPDF v8.0.4PHP 8.0is supported sincemPDF v8.0.10PHP 8.1is supported as ofmPDF v8.0.13PHP 8.2is supported as ofmPDF v8.1.3PHP 8.3is supported as ofmPDF v8.2.1PHP 8.4is supported as ofmPDF v8.2.5
PHP extensions required, partially required or recommended:
- PHP
mbstring(includingmbregex, which needs to be explicitly enabled in some environments) andgdextensions 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 FPDIbcmathfor generating barcodesxmlfor character set conversion and SVG handling.curlextension is used for remote HTTP calls if available.
mPDF is not compatible with PHP function overloading (mbstring.func_overload)
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