Answers for "how to use base64 image in tcpdf"

0

how to use base64 image in tcpdf

$img_base64_encoded = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA0gA...';

$img = '<img src="@' . preg_replace('#^data:image/[^;]+;base64,#', '', $img_base64_encoded) . '">';

$pdf->writeHTML($img, true, false, true, false, '');
Posted by: Guest on August-25-2020

Browse Popular Code Answers by Language