开发者

Exporting svg with foreignObject tag as an Image using PHP or Java

开发者 https://www.devze.com 2023-02-22 06:03 出处:网络
Is there a way to export an <svg> tag containing <foreignObject> as an Image using PHP or Java? I have tried https://github.com/sampula/SVG.toDataURL but it does not support foreignObject.

Is there a way to export an <svg> tag containing <foreignObject> as an Image using PHP or Java? I have tried https://github.com/sampula/SVG.toDataURL but it does not support foreignObject.

The only reason I want to be able to encode the foreignObject as to 开发者_开发知识库base64 is because that the foreignObject tag contains some HTML and an image inside.

Is there anyway to do this?


Old question but, yes I've successfully done it using phantomjs

0

精彩评论

暂无评论...
验证码 换一张
取 消