I\'ve this string from Mysql db:
$img_base64_encoded =
\'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+
You cannot use base64 stream in src rather first save the stream to a file then use it
$img_base64_encoded = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA0gA...';
$imageContent = file_get_contents($img_base64_encoded);
$path = tempnam(sys_get_temp_dir(), 'prefix');
file_put_contents ($path, $imageContent);
$img = '';
$pdf->writeHTML($img, true, false, true, false, '');