Open sophistifunk opened 3 years ago
I am also facing this issue. I have an svg which contain svg elements and also base64 png data. But I am getting only the svg elements in the pdf. That is the png image inside that svg is missing.
Same here... embedded image/png;base64
works, embedded image/svg+xml;base64
does not.
I am also facing this issue. Any fix on this?
I was able to "do it yourself" by replacing all <image/>
tags with the content of the refered SVG (or decoding the base64 data in your case) and adding a <image/>
's x, y, width, height).
SVG-to-PDFKit just handles the <image/>
to PDFKit, which doesn't know what to do as it doesn't support SVGs... else we wouldn't be using SVG-to-PDFKit in the first place.
I've got an SVG with an embedded base64 image, which is itself an SVG, which gives me a
SVGElemImage: failed to open image "data:image/svg+xml;base64,....." in PDFKit
error, I'm guessing because it only supports PNG/JPG. Is there a way to get SVG-to-PDFKit to handle those embedded SVG images instead of trying to get PDFKit to do it?