title: How to fit a wide table using jspdf, jspdf-autotable
body: <p>I'm using jspdf with the plugin jspdf-autotable to create a pdf for a very wide table, is there a way to auto fit the table/column data to any page size?</p>
  
  <p>I tried the code below with overflow: 'linebreak' but it breaks the words halfway not at the empty space</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function demoPDF() {
    var pdfsize = 'a0';
    var pdf = new jsPDF('l', 'pt', pdfsize);
  
    var res = pdf.autoTableHtmlToJson(document.getElementById("rpt_tbl"));
    pdf.autoTable(res.columns, res.data, {
      startY: 60,
      tableWidth: 'auto',
      columnWidth: 'auto',
      styles: {
        overflow: 'linebreak'
      }
    });
  
    pdf.save(pdfsize + ".pdf");
  };</code></pre>
  </div>
  </div>
  </p>