Search code examples
javascripthtml2canvas

How to capture SVGs with oveflow set using HTML2Canvas?


SVGs with a style "overflow: visible" doesn't seem to be capturing correctly using the latest HTML2Canvas

As you can see in this fiddle, the full SVG is not captured even though I am capturing a container which is sufficiently large enough, or even if I capture the entire body:

Any suggestions on if I can resolve this?

Thanks

(EDIT ADDED FIDDLE TO COMMENTS)


Solution

  • At this time I still dont think it is possible for HTML2Canvas to capture overflow. So I had to work around by having to temporarily recreate the svg and offsetting it to account of the area that was in the overflow