Prd tomu rozumím, ale našel jsem
Image data as a Variable
A PHP variable containing image data can be passed directly to mPDF. You need to allocate the data to a class variable
(you can make any name up) e.g.
$mpdf->myvariable = file_get_contents('alpha.png');
The image can then be referred to by use of "var:varname" instead of a file name, either in src="" or direct to Image() function e.g.
$html = '<img src="var:myvariable" />';
$mpdf->WriteHTML($html);
$mpdf->Image('var: myvariable',0,0);
|