Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is possible to support base64 src based? #127

Open
didix16 opened this issue Jun 22, 2017 · 2 comments
Open

Is possible to support base64 src based? #127

didix16 opened this issue Jun 22, 2017 · 2 comments

Comments

@didix16
Copy link

didix16 commented Jun 22, 2017

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 :)

@Armstrong1992
Copy link

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);

@didix16
Copy link
Author

didix16 commented Jul 13, 2017

Yes. Okay thank you so much. I'll try it :) 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants