DEV Community

sriniashok
sriniashok

Posted on

need help for export pdf in angular

Export in json data to Pdf using jspdf and jspdf-autotable
but that AutoTable not accept json formet
my code

const doc = new jsPDF.default();

const b = [ {"bank_Name":"citybank","short_Code":"CIb","country":"American Samoa"},
{"bank_Name":"senabank","short_Code":"db","country":"Antarctica"},
{"bank_Name":"dBS bank","short_Code":"dbs","country":"Singapore"} ]

autoTable(doc,{columns: this.cols, body: b,)
doc.save('bank.pdf');

Top comments (0)