You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi, i can run autoTable with jsPDF, using autoTable up to 3.5.12 ... but when i try to use 3.5.13 up to 3.5.31, i get the error:
TypeError: doc.autoTable is not a function
Any suggestions? I'd want to make sure autoTable later versions can work too. (p.s. if we need a later jsPDF version, please let me know too). Thanks!
So, this works:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.5.12/jspdf.plugin.autotable.min.js"></script>
But this doesn't:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.5.31/jspdf.plugin.autotable.min.js"></script>
The same simple code is being used, it works up to autoTable 3.5.12 only:
The current version has a bug that prevents it from working with v1 of jspdf in the browser, this will be fixed in v4, for now you can use jspdf v2 from this link https://unpkg.com/jspdf@latest/dist/jspdf.umd.min.js
hi, i can run autoTable with jsPDF, using autoTable up to 3.5.12 ... but when i try to use 3.5.13 up to 3.5.31, i get the error:
TypeError: doc.autoTable is not a function
Any suggestions? I'd want to make sure autoTable later versions can work too. (p.s. if we need a later jsPDF version, please let me know too). Thanks!
So, this works:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.5.12/jspdf.plugin.autotable.min.js"></script>
But this doesn't:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.5.31/jspdf.plugin.autotable.min.js"></script>
The same simple code is being used, it works up to autoTable 3.5.12 only:
PageModule.prototype.exportToPDFTable = function () {
var doc = new jsPDF();
doc.autoTable({
startY: 20,
head: [['ID', 'Name', 'Email', 'Country', 'IP-address']],
body: [
['1', 'Donna', 'dmoore0@furl.net', 'China', '211.56.242.221'],
['2', 'Janice', 'jhenry1@theatlantic.com', 'Ukraine', '38.36.7.199'],
[
'3',
'Ruth',
'rwells2@constantcontact.com',
'Trinidad and Tobago',
'19.162.133.184',
],
['4', 'Jason', 'jray3@psu.edu', 'Brazil', '10.68.11.42'],
['5', 'Jane', 'jstephens4@go.com', 'United States', '47.32.129.71'],
['6', 'Adam', 'anichols5@com.com', 'Canada', '18.186.38.37'],
],
});
doc.save('table.pdf');
};
The text was updated successfully, but these errors were encountered: