Html2canvas: Blank canvas in Chrome

Created on 4 Sep 2019  ·  6Comments  ·  Source: niklasvh/html2canvas

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:

  • [+] You are using the latest version
  • [+] You are testing using the non-minified version of html2canvas and checked any potential issues reported in the console

Bug reports:

Hi, I am having troubles with generating canvas on Chrome. I am trying to capture specific div. It works okay on Firefox, however there is only blank white screen in size of generated canvas. It just behave like all child elements of that div have gone or are transparent or something like that.

When I switch to the latest 0.5 version of html2canvas it works okay on all browsers.

Are there any known issue? Maybe some unsupported css? I have tried it on multiple elements, with/without positioning, not just one div, but with no luck.

Thanks for any advice.

Specifications:

  • html2canvas version tested with: All from the latest 1.0 rc3 to first 1.0 version
  • Browser & version: Chrome 76.0.3809.132
  • Operating system: Windows 8.1

Most helpful comment

I use dom-to-image it's better than any other libraries.

All 6 comments

Facing same kind of issue. Getting blank white canvas every time.

Try disable foreignObjectRendering

Same issue in latest Chrome 77, tried with foreignObjectRendering: false but still same.

I use dom-to-image it's better than any other libraries.

@Abdullah0991 Thank you, dom-to-image really works.

@Abdullah0991 I just wasted 3 hours trying to get html2canvas to work. Wish I'd seen your comment sooner. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rrutkows picture rrutkows  ·  4Comments

dking3876 picture dking3876  ·  4Comments

anthonymejia picture anthonymejia  ·  4Comments

koreanman picture koreanman  ·  4Comments

wbarrantes picture wbarrantes  ·  3Comments