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

Better SVG handling #2228

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

Connum
Copy link

@Connum Connum commented Apr 7, 2021

This PR improves the following aspects of SVG handling:

I don't currently have the time to write additional tests regarding this, but I needed this asap for a project I'm working on and I think it's a good addition to the SVG functionality of the library. So help is welcome by the current maintainer or any other volunteer contributor to add tests.

That said, I tested this successfully in the dev-playground with inline SVG, from a URL and as base64 string, both using { image: '...' } as well as { svg: '...' }.

Once the docs get updated for 0.2, the notice "except it is not currently possible to refer to SVGs by file or re-use from a dictionary" currently visible at https://pdfmake.github.io/docs/0.1/document-definition-object/svgs/ should also be removed, and maybe it should be noted that either the svg (for backwards compatibility) or image property can be used.

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

Successfully merging this pull request may close these issues.

SVG files without viewBox does not render
1 participant