jspdf create table
convert() {
var doc = new jsPDF();
var col = ["Sr. No.","Details"];
var col1 = ["Details", "Values"];
var rows = [];
var rows1 = [];
/* The following array of object as response from the API req */
var itemNew = [
{ index:'1',id: 'Case Number', name : '101111111' },
{ index:'2',id: 'Patient Name', name : 'UAT DR' },
{ index:'3',id: 'Hospital Name', name: 'Dr Abcd' }
]
itemNew.forEach(element => {
var temp = [element.index,element.id];
var temp1 = [element.id,element.name];
rows.push(temp);
rows1.push(temp1);
});
doc.autoTable(col, rows, { startY: 10 });
doc.autoTable(col1, rows1, { startY: 60 });
doc.save('Test.pdf');
}
Also in JavaScript:
- display amount with currency for jquery
- react redux middleware
- javascript boolean change value
- transaction commit rollback nodejs
- update angular cli
- html initialize select
- node path resolve
- app.js:38650 [Vue warn]: Failed to mount component: template or render function not defined
- deutsches ajax framework
- react search when stop typing
- definition destructuring react
- unity rotate object to match normal
- ModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js): Error: ENOENT: no such file or directory, scandir
- create window electron
- convert table to excel reactjs
- react native animation libraries
- Javascript modify URL without reload
- how to get a String in dart
- how to make a scrollable list component in react js
- get and set es6
- js some array
- javascript format date yyyy-mm-dd hh:mm:ss to dd-mm-yyyy hh:mm am/pm
- how to create uuid in javascript
- count value a to b character javascript