jsPDF with colspan at the top of the table

0

I'm trying to build a pdf based on the image below

IcanmanagethePDF,butwithoutthelinewith"Info" and "Contact". Is it possible to generate the pdf in the same way as in the image?

That's what I've been able to do so far

this.pdf = function(title, table, hideInfo) { 
 var doc = new jsPDF('l', 'pt', 'a4'), start = 65;

 doc.setFont('helvetica');
 doc.setFontSize(8);
 doc.text(title, (doc.internal.pageSize.width - 
 doc.getStringUnitWidth(title) * 8) / 2, 50);
 doc.setFontSize(6);

 doc.autoTable(table.columns, table.data, {
 startY: start,
 margin: { horizontal: 25 },
 styles: { overflow: 'linebreak', fontSize: 6, font: 'helvetica' },
 bodyStyles: { valign: 'top' },
 pageBreak: 'auto',
 theme: 'grid',
 columnWidth: 'wrap',
 headerStyles: { fillColor: [20, 167, 146] },
 drawCell: function(cell, data) {
 if (data.row.raw[0] && data.row.raw[0].toString().trim().toLowerCase() === 'total') {
  doc.setFillColor(233, 233, 233);
  doc.setFontType("bold");
 }
}}); 
doc.save(title.replace(/ /g,"_") + '.pdf');};
    
asked by anonymous 14.09.2018 / 17:32

0 answers