I can see CSV button and I'm able to download CSV, but I'm not able to see PDF button, can anyone help me with this?
extend: 'pdfHtml5',
text: 'PDF',
className: 'btn-sm invisible buttons-pdf',
exportOptions: { columns: ':visible' ,stripNewlines: false, trim : false},
title: this.criteria.get('name'),
orientation: 'landscape',
footer: true : false,
customize: function (doc) {
console.log($colCount);
console.log(doc);
let colCount = $colCount;
doc.styles.tableHeader.fontSize = 12;
doc.defaultStyle.fontSize = 11;
doc.styles.tableBodyEven.alignment = 'center';
doc.styles.tableBodyOdd.alignment = 'center';
doc.styles.tableFooter = {
alignment: 'center',
fillColor:"#2d4154",
bold: true,
fontSize: 12,
color: "white"
}
doc.styles.tableBodyOdd.noWrap = true;
doc.styles.tableBodyOdd.fillColor = '#f3f3f3';
console.log(doc.content[1].table.body[($rowCount)+1]);
_.each(doc.content[1].table.body[($rowCount)+1], function(col, key) {
if(col.text != "") {
var text = col.text.split(/\r\n|\r|\n/g);
col.text = text[1];
}
});
for (i = 0; i <= $rowCount; i++) {
doc.content[1].table.body[i][0].alignment = 'left';
};
var colWidth = [];
var width;
for (i = 0; i < colCount; i++) {
width = 100 / colCount;
colWidth.push(width + '%');
}
doc.content[1].table.widths = colWidth;
}
Do I need to import something while extending to pdfHtml5? Am I missing something?