PHPPdf
PHPPdf copied to clipboard
Is possible to support base64 src based?
Hi, I dunno if this project is abandoned or not but in case not, could be possible to add support for base64 url?
Thanks in advance :)
You mean in img tag right? If so create new Node extending img Node and override createSource function with something like (Imagine required):
$temp = tempnam(sys_get_temp_dir(), 'TMP_');
(new Imagine())->load(base64_decode($this->getAttribute('src')))->save($temp, ['format' => 'png']);
return new \PHPPdf\Core\Engine\ZF\Image($temp);
Yes. Okay thank you so much. I'll try it :) 👍