I would like to get only viewport screenshot from the library html2canvas.js, set option type to 'view' should do the trick but i'm still getting the entire body.
Don't really get why this is not working actually.
Here is the code i'm currently running:
html2canvas(document.body, { type: 'view' }).then(function(canvas) {
var img = canvas.toDataURL("image/png");
$('.ticket-img').attr('src', img);
});