How to remove certain elements before taking screenshot?
Add this attribute: data-html2canvas-ignore to any element you don’t want to be taken when the screenshot is processed. Hopefully this will help the next guy.
Add this attribute: data-html2canvas-ignore to any element you don’t want to be taken when the screenshot is processed. Hopefully this will help the next guy.
NOTE: this answer is from 2015 and the library has been updated. Check the answers below for alternate implementations. Try this (Note that it makes use of the download attribute. See the caniuse support table for browsers that support the download attribute) <script> $(‘#save_image_locally’).click(function(){ html2canvas($(‘#imagesave’), { onrendered: function (canvas) { var a = document.createElement(‘a’); // … Read more