title: How to convert HTML page as well as a Table using jsPDF and Autotable
body: <p>I've found a lot of information online regarding either JSPDF or Autotable but none that combine both, all I am looking to achieve is to use the ID of the main DIV to generate a full HTML page PDF although I have a table in that page, and would like the table formatted using the Autotable function as it looks awful just using JSPDF.</p>
  <p>I have tried variations such as this but nothing seems to work.</p>
  <p>My HTML is under <code>id=&quot;content&quot;</code> and the table is <code>id=&quot;basic_table&quot;</code></p>
  <pre><code>&lt;script type=&quot;text/javascript&quot;&gt;  
  function generate() {  
      var doc = new jsPDF('p', 'pt', 'letter');  
      var htmlstring = '';  
      var tempVarToCheckPageHeight = 0;  
      var pageHeight = 0;  
      pageHeight = doc.internal.pageSize.height;  
      specialElementHandlers = {  
          // element with id of &quot;bypass&quot; - jQuery style selector  
          '#bypassme': function(element, renderer) {  
              // true = &quot;handled elsewhere, bypass text extraction&quot;  
              return true  
          }  
      };  
      margins = {  
          top: 150,  
          bottom: 60,  
          left: 40,  
          right: 40,  
          width: 600  
      };  
      var y = 20;  
      doc.setLineWidth(2);  
      doc.fromHTML(&quot;#content&quot;);  
      doc.autoTable({  
          html: '#simple_table',  
          startY: 70,  
          theme: 'grid',  
          columnStyles: {  
              0: {  
                  cellWidth: 180,  
              },  
              1: {  
                  cellWidth: 180,  
              },  
              2: {  
                  cellWidth: 180,  
              }  
          },  
          styles: {  
              minCellHeight: 40  
          }  
      })  
      doc.save('Marks_Of_Students.pdf');  
  }  
  &lt;/script&gt; 
  </code></pre>