MPDF class - Base64 images

Asked

Viewed 221 times

0

good afternoon, I am using a mdpf class to generate the PDF of a file, but when using an image in Base64 inside a <img> model my image did not appear Ela fica dessa forma

Function:

    $date = date("dmYHi");
    $mpdf = new mPDF('','A4',0,'',10,5,7,7,6,6,'L');
    $mpdf->charset_in='windows-1252';
    $mpdf->WriteHTML($modelo);
    $mpdf->Output("boletos/orcamentopdf_".$date.$_GET['id'].".pdf");

Can someone tell me a way to fix this or to record the model with the image in the comic book?

Obs.: When I go through the browser everything comes out right and beautiful! Only using this function that!

  • Your image tag looks like this? <img src="data:image/jpeg;base64, ...código gigante..." >

  • Exactly! <img src="data:image/png;base64, ... > only changes the length!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.