Html2Canvas then Canvas2Image cutting the generated image
<p>I'm trying to generate a PDF from a Html calendar on my web app, but when I convert the html into a cavas and than convert it to and image I got the image cutted, missing the last part of the calendar.</p>

<p><a href="https://i.stack.imgur.com/ELVfU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ELVfU.png" alt="enter image description here"></a></p>

<p>The cropping of the image depends on the screen size, if I try to generate it on a bigger screen it looks like this:</p>

<p><a href="https://i.stack.imgur.com/RGvHH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RGvHH.png" alt="enter image description here"></a></p>

<p>My code looks like this:</p>

<pre><code>var html2Obj = html2canvas($('#calendar'));
var queue = html2Obj.parse();
var canvas = html2Obj.render(queue);
var img = canvas.toDataURL();
window.open(img);
var doc = new jsPDF('landscape', 'cm');
doc.addImage(img, 'JPEG', 1, 1, 27.7, 19);
doc.save('calendar.pdf');
</code></pre>

<p>So, how can I create that screenshot without losing the page content?</p>