title: HTML2Canvas creating multiple divs
body: <p>I'm trying to create a PDF using jsPDF and HTML2Canvas.
  I have multiple DIVs to insert into the PDF. 
  If I try to put all DIVs into a container and render once then it only puts the first page height into the PDF. 
  Can't figure out how to render multiple divs and stick them in the same PDF so that it keeps going page by page. </p>
  
  <p>JAVASCRIPT</p>
  
  <pre class="lang-js prettyprint-override"><code>function genPDF() {         
      html2canvas(document.getElementById("container"), {
  
          onrendered: function (canvas) {
  
              var img = canvas.toDataURL();
  
              var doc = new jsPDF(); 
              doc.addImage(img, 'PNG');
              doc.addPage(); 
  
              doc.save('test.pdf');
          }
      });
  }
  </code></pre>
  
  <p>HTML</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="container"&gt;
      &lt;div class="divEl" id="div1"&gt;Hi &lt;img  src="img1.JPG"&gt; &lt;/div&gt;
      &lt;div class="divEl" id="div2"&gt;Why &lt;img  src="img2.PNG"&gt; &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;button onClick="genPDF()"&gt; Click Me &lt;/button&gt;
  </code></pre>