mPDF Manual – Troubleshooting

mPDF class fails to Initialise

mPDF still retains use of a constructor function with the same name as the class i.e.

class mPDF {


function mPDF(...)

This means it is still compatible with PHP4, and is backwards compatible using PHP5 - UNLESS you are using namespaces in PHP >= 5.3

In this case you will need to rename:

function mPDF(...) {


__construct(...) {