I have a small issue with mPDF (version 5.7.1).
This code should generate PDF with image file:
$mpdf = new mPDF(); $html = \'
You can try this:
$mpdf->imageVars['myvariable'] = file_get_contents('alpha.png');
or
$html = ''; $mpdf->WriteHTML($html);
after there, you should do:
$mpdf->Image('var:myvariable', 0, 0);
read more about this in documentation: mPDF Load Image