mPDF Manual – Troubleshooting

mPDF class fails to Initialise

(mPDF < 6.1)

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

<?php
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 upgrade at least to mPDF 6.1

Fork me on GitHub