create table
CREATE TABLE fact (
id SERIAL PRIMARY KEY NOT NULL,
type VARCHAR(255),
text TEXT
);
create table
CREATE TABLE fact (
id SERIAL PRIMARY KEY NOT NULL,
type VARCHAR(255),
text TEXT
);
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');
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us