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

SVG files without viewBox does not render #1999

Open
edwin177 opened this issue Jun 11, 2020 · 3 comments · May be fixed by #2228
Open

SVG files without viewBox does not render #1999

edwin177 opened this issue Jun 11, 2020 · 3 comments · May be fixed by #2228
Labels

Comments

@edwin177
Copy link

edwin177 commented Jun 11, 2020

SVG files without viewBox defined (but height and width defined) do not render when using fit. If I manually add viewBox="0 0 width height", then it renders fine.

For now, I'm parsing the SVG node and appending viewBox manually if it's missing, before sending it to pdfmake.

on node
"pdfmake": "0.1.65",

@liborm85
Copy link
Collaborator

Attach example for reproduce issue.

@edwin177
Copy link
Author

Two SVGs attached:
Logos.zip

  • sample.svg has viewBox defined and works fine
  • SVG.svg only has height and width, and does not render using fit

@Connum
Copy link

Connum commented Apr 7, 2021

I'm working on better SVG handling and also fixed this issue in my fork:
Connum@4c9b940

@Connum Connum linked a pull request Apr 7, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants