Closed Dev-SK01 closed 2 months ago
import React from "react"; import jsPDF from "jspdf"; import "jspdf-autotable";
const Tabls = () => { const generatePDF = () => { const doc = new jsPDF() // Simple data example var head = [['ID', 'Country', 'Rank', 'Capital']] var body = [ [1, 'Denmark', 7.526, 'Copenhagen'], [2, 'Switzerland', 7.509, 'Bern'], [3, 'Iceland', 7.501, 'Reykjavík'], ] doc.autoTable({ head: head, body: body }) doc.save('table.pdf'); };
return (
); };
export default Tabls;
this is my sample code it shows err : Uncaught TypeError: Cannot set properties of undefined (setting 'pageNumber') at Table2
I found a the solution
This issue will soon be closed since issues in this project are mainly meant to be bugs or feature requests. Questions are directed to stackoverflow.
import React from "react"; import jsPDF from "jspdf"; import "jspdf-autotable";
const Tabls = () => { const generatePDF = () => { const doc = new jsPDF() // Simple data example var head = [['ID', 'Country', 'Rank', 'Capital']] var body = [ [1, 'Denmark', 7.526, 'Copenhagen'], [2, 'Switzerland', 7.509, 'Bern'], [3, 'Iceland', 7.501, 'Reykjavík'], ] doc.autoTable({ head: head, body: body }) doc.save('table.pdf'); };
return (
); };
export default Tabls;
this is my sample code it shows err : Uncaught TypeError: Cannot set properties of undefined (setting 'pageNumber') at Table2