-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Description
Please make sure you are testing with the latest release of html2canvas.
Old versions are not supported and issues reported for them will be closed.
Please follow the general troubleshooting steps first:
- [x ] You are using the latest version
- [x ] You are testing using the non-minified version of html2canvas and checked any potential issues reported in the console
Bug reports:
I am trying to use html2canvas to generate an image from a page that contains an SVG in the form of a base-64 encoded data URI in an <img> tag. This has been working fine in Chrome but not in Firefox. I think this may be because Firefox is returning 0 for both img.naturalWidth and img.naturalHeight which as used as the intrinsicWidth and intrinsicHeight values in the ImageElementContainer class. The SVG has width and height attributes set. Could the intrinsicWidth and intrinsicHeight values be derived from the <svg>'s width and height instead of the <img>'s naturalWidth and naturalHeight?
I don't have an example I can easily provide but I can create a jsfiddle if needed.
Specifications:
- html2canvas version tested with: 1.0.0-rc.3
- Browser & version: Firefox 67.0.2
- Operating system: Windows 10