title: add multiple pages in pdf using html2canvas and jspdf
body: <p>my below code is working fine but i want all pages in one PDF. i have 2 json object. when i click on button its open in 2 tab with different result i want its open in one pdf tab add multiple records in multiple pages in one pdf. can you help me on this.</p>
  
  <pre><code>for (let i = 0;i  &lt;= this.reportVGWM.length; i++){
            html2canvas(document.querySelector('#myTable' + i)).then(canvas =&gt; {
              var imgWidth = 180;
              var pageHeight = 280;
              var imgHeight = canvas.height * imgWidth / canvas.width;
              var heightLeft = imgHeight;
              var imgData = canvas.toDataURL("image/jpeg");
              var heightLeft = imgHeight;
              var pdf = new jsPDF('p', 'mm', 'a4');
              var position = 20;
              var font: { 'padding-bottom: 40%; padding-top:30%' };
              pdf.addImage(imgData, 'PNG', 10, position, imgWidth, imgHeight);
              pdf.addPage();                 
              pdf.output('dataurlnewwindow');
  
            });
          }
          }, 1);
        });
  </code></pre>