I have a small issue with mPDF (version 5.7.1).
This code should generate PDF with image file:
$mpdf = new mPDF();
$html = '<img src="https://www.google.pl/images/srpr/logo11w.png"/>';
$mpdf->debug = true;
$output = $mpdf->Output();
I had the same problem with PNG images being displayed as [X] when to generate PDFs with mPDF.
$mpdf->showImageErrors = true;
$mpdf = new Mpdf();
and got the error message:
GD library required for PNG image (alpha channel)#
So after running
apt-get install php5-gd generating a PDF with a PNG worked like a charm!