You have to convert your columnWidth
array to look like this:
doc.autoTable({ html: '#table', columnStyles: { 0: {cellWidth: 100}, 1: {cellWidth: 80}, 2: {cellWidth: 80}, // etc } });
A point to be noted is that here we used columnStyles
instead of styles
.