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

Trying to embed image from svg file throws error #169

Open
mickey58github opened this issue Sep 15, 2022 · 0 comments
Open

Trying to embed image from svg file throws error #169

mickey58github opened this issue Sep 15, 2022 · 0 comments

Comments

@mickey58github
Copy link

mickey58github commented Sep 15, 2022

Hi, in one of my svgs to be included in a pdf, I'm trying to embed an svg image from a local file, on my Node server, through:
<svg><image href="full-path-to-local-svg-image-file/test-image.svg"/></svg>

This works successfully for me for local png files (.png).

But if I try the same with an svg file, I get the error:
"SVGElemImage: failed to open image "full-path-to-local-svg-image-file/test-image.svg" in PDFKit"

Is loading of svg files through <image href="..."> supported or not?

Thanks for any hints on this.

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

1 participant