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 image/background image not rendering properly #2492

Open
mprabs opened this issue Mar 16, 2021 · 2 comments
Open

Svg image/background image not rendering properly #2492

mprabs opened this issue Mar 16, 2021 · 2 comments

Comments

@mprabs
Copy link

mprabs commented Mar 16, 2021

Bug reports:

I have set a background-image that of svg format in the div and have multiple image elements inside the div. But the div isn't being rendered properly by html2canvas.

Image to render :
image

Image Rendered
image

My code looks like:
const node= document.getElementById('element'); html2canvas(node, { allowTaint: true, useCORS: true }).then(canvas => { const image = canvas.toDataURL('image/png', canvas.width, canvas.height) })

  • The rendered icons is SVG which is not proper.
  • The background is also SVG which is half.
  • The other images are from server (i.e. src={imageLink}).

Specifications:

  • html2canvas version tested with:
  • Browser & version: 1.0.0-rc.7
  • Operating system: Windows 10
@joswhite
Copy link

joswhite commented Mar 17, 2021

Can you provide an example of this issue using jsfiddle?

@rshelnutt
Copy link

This appears related to #1406

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

3 participants