jsPDF-Autotable Auto Increase Width of Columns/Rows With Content

jsPDF-Autotable Tutorial to Auto Increase Width of Column & Rows With Content Without Breaking in Browser Using Javascript

The text key in the example is a reference to the datakey in the example data. As you are using the autoTableToHtml function your data keys will be integer-based and therefore your columnStyles should look like this:

columnStyles: {
  2: {
    columnWidth: 'auto'
  }
}

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.