simonbengtsson / jsPDF-AutoTable

jsPDF plugin for generating PDF tables with javascript
https://simonbengtsson.github.io/jsPDF-AutoTable/
MIT License
2.31k stars 624 forks source link

Uncaught TypeError: Cannot set properties of undefined (setting 'pageNumber') at Table2 #1067

Closed Dev-SK01 closed 2 weeks ago

Dev-SK01 commented 1 month 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 (

x
Register Number Name Department Regulation
Students Not Found ! Students Not Found ! Students Not Found ! Students Not Found !

); };

export default Tabls;

this is my sample code it shows err : Uncaught TypeError: Cannot set properties of undefined (setting 'pageNumber') at Table2

Dev-SK01 commented 4 weeks ago

I found a the solution

github-actions[bot] commented 3 weeks ago

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.