title: columns wrap jsPDF auto-table not working?
body: <p>By looking at many examples online, it seems straightforward, but I am not able to wrap my columns (line break). I am not able to change the versions due to some internal conflicts where the code eventually goes. what I am doing wrong ? I used to make an object and pass it as a parameter to doc.autotable() but that seems not rendering to the pdf, so I am doing the styling "inline" in the parameter like the example below. I want to wrap name and country to next lines, like one would do to a regular table. these data all comes from the back end so, I want to check for this before becomes a problem.</p>
  
  <p>it looks like this now <a href="https://i.stack.imgur.com/knqDa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/knqDa.png" alt="enter image description here"></a></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="ie=edge"&gt;
      &lt;title&gt;Document&lt;/title&gt;
  
      &lt;script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.2.60/jspdf.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/2.0.15/jspdf.plugin.autotable.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/2.0.15/jspdf.plugin.autotable.src.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;button onclick="generatePdf()"&gt;Generate pdf&lt;/button&gt;
  
  
      &lt;script&gt;
          function generatePdf() {
  
              var columns = [{
                  title: "ID",
                  dataKey: "id"
              },
              {
                  title: "Name",
                  dataKey: "name"
              },
              {
                  title: "Country",
                  dataKey: "country"
              },
              ];
              var rows = [{
                  "id": 1,
                  "name": "ShawNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelson",
                  "country": "TanzaniaNelsonNelsonNelsonNelsonNelson"
              },
              {
                  "id": 2,
                  "name": "NelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelson",
                  "country": "KazakhstanNelsonNelsonNelsonNelsonNelsonNelsonNelson"
              },
              {
                  "id": 3,
                  "name": "GarciaNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelson",
                  "country": "MadagascarNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelsonNelson"
              },
              ];
  
  
              var doc = new jsPDF('p', 'pt');
  
              var header = function (data) {
                  doc.setFontSize(18);
                  doc.setTextColor(40);
                  doc.setFontStyle('normal');
                  doc.text("Testing Report", data.settings.margin.left, 50);
              };
  
              doc.autoTable(columns, rows, {styles: {
                  overflow: 'linebreak',
                  columnWidth: 'wrap'
              },
                  columnStyles: {
                      2: { columnWidth: 'auto' }
                  }
                  
              });
  
              doc.save("table.pdf");
          }
      &lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>