My example (just click "export PDF"): https://jsfiddle.net/j9vaqpnz/7/
My example exports my table which looks like this:
The table then is exported to pdf using libraries jspdf and autotable.
During the export function I use the "drawCell" function and for all columns which contain a number i right-align them as follows:
drawCell: function (cell, data) {
var col = data.column.index;
if(col==3 || col==5 || col==6 || col==7 || col==8 || col==9 || col==10){
cell.styles.halign = 'right';
}
}
.
Problem: In the PDF all the columns which I have right-aligned are positioned inproperly, it looks like this:
Is this a bug? Or maybe I am using "drawCell" inproperly?