Note that html2canvas has a lot of limitations, since everything that needs to be rendered has to be implemented from scratch using canvas primitives. If you have (IIRC) shadows, more advanced CSS features, certain SVG icons, etc., your output will be pretty broken. I usually have to do DOM cloning and modify/hide the problematic parts before using html2canvas to generate an image.
It’s incredibly annoying that screenshotting isn’t a DOM API, while the functionality is clearly there in DevTools.
Edit: To add to the annoyance, iOS Safari is extremely stingy with canvas memory.