0
I need to generate pdf from a table, only my header has several lines and my code is overlapping those lines, follow picture:
I need each tr to be in a different line, as it would be possible?
var startColPosition=defaults.pdfLeftMargin;
$(el).find('thead').find('tr').each(function() {
$(this).filter(':visible').find('th').each(function(index,data) {
if ($(this).css('display') != 'none'){
if(defaults.ignoreColumn.indexOf(index) == -1){
var colPosition = startColPosition+ (index * 50);
doc.text(colPosition,20, parseString($(this)));
}
}
});
});
recommend using the jsPDF-Autotable plugin that deals with the printing of tables.
– Sérgio Sereno