-
Open html file with broswer
-
Open console, paste following code snippet
let base64png;
fetch('https://html2canvas.hertzen.com/dist/html2canvas.min.js')
.then(response => response.text())
.then(text => eval(text))
.then(() => html2canvas(document.body))
.then(canvas => (base64png = canvas.toDataURL()))
.then(() => console.log('finish!'))
.catch(error => console.log('failed, error detail: ', error));- Copy value of base64png into clipboard by typing:
copy(base64png);
- Go to https://onlinepngtools.com/convert-base64-to-png, paste the value of base64png, and download png file 🎉