I have a small issue with mPDF (version 5.7.1).
This code should generate PDF with image file:
$mpdf = new mPDF(); $html = \'
change to remove the second line before initializing $html its undefined at that time. new code will be as
$mpdf = new mPDF(); $html= ""; $mpdf->WriteHTML($html); $mpdf->debug = true; $output = $mpdf->Output(); exit();