Requirements v7+
Since mPDF 7.0 is compatible with these PHP versions:
PHP >=5.6 <7.3.0
is supported formPDF >= 7.0
PHP 7.3
is supported sincemPDF v7.1.7
PHP 7.4
is supported sincemPDF v8.0.4
PHP 8.0
is supported sincemPDF v8.0.10
PHP 8.1
is supported as ofmPDF v8.0.13
PHP 8.2
is supported as ofmPDF v8.1.3
PHP 8.3
is supported as ofmPDF v8.2.1
PHP 8.4
is 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) andgd
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 for importing existing PDF files with FPDIbcmath
for generating barcodesxml
for character set conversion and SVG handling.curl
extension 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