Skip to content

Better SVG handling#2228

Open
Connum wants to merge 8 commits intobpampuch:masterfrom
Connum:better-svg-handling
Open

Better SVG handling#2228
Connum wants to merge 8 commits intobpampuch:masterfrom
Connum:better-svg-handling

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