Hi All,
I have a use case in which I want to export my table data as pdf document with some pre defined pdf headers. I tried using jsPDF library to do it but its not working.
Javascript function:
PageModule.prototype.PDFheaders = function(myTable){
var doc = new jsPDF();
var headers = function(){
doc.setFontSize(15);
doc.text("Sample predefined headers", doc.internal.pageSize.width / 2, 10,'center');
};
doc.autoTable({
startY: 20,
head: [[{content: '{html: myTable}', styles: {halign: 'center'}}]],
didDrawPage: headers
});
doc.setFont("times", "normal");
doc.setFontSize(12);
doc.text("Lorem ipsum text", 20, 40);
window.open(URL.createObjectURL(doc.output("blob")));
};
I am passing the id of oj-table in myTable parameter.
Above function is generating the pdf with headers but table data is not generating into pdf.
How to generate the table data into PDF.
@shay-shmeltzer-oracle