title: Image in PDF cut off: How to make a canvas fit entirely in a PDF page?
body: <p>When placing the canvas in the PDF using the jspdf library makes the image cut off.</p>
  
  <pre><code>html2canvas(myContainer, {background: 'red'}).then (canvas) -&gt;
    imgData = canvas.toDataURL('image/jpeg', 1.0)
    window.open(imgData) # this is just a test that opens the image in a new tab and it displays nicely, the entire image
    pdf = new jsPDF("l", "pt", "b1") # tried a variety of formats but no luck
    pdf.addImage(imgData, 'JPEG', 0, 0)
    pdf.save('file.pdf') # the generated pdf that contains the image gets trimmed
  </code></pre>
  
  <p>Does anyone have any ideas how to make the canvas fit?</p>