Skip to content

Commit cd7b967

Browse files
Update examples
1 parent bf08216 commit cd7b967

File tree

12 files changed

+23
-10
lines changed

12 files changed

+23
-10
lines changed

examples/nodejs.mjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { jsPDF } from 'jspdf'
2+
import { autoTable } from '../dist/jspdf.plugin.autotable.js'
3+
4+
const doc = new jsPDF()
5+
autoTable(doc, {
6+
columns: ['Name', 'Email', 'Phone'],
7+
body: [
8+
['John Doe', '[email protected]', '1234567890'],
9+
['Jane Doe', '[email protected]', '0987654321'],
10+
],
11+
})
12+
13+
doc.save('table.pdf')

examples/simple.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<body>
1010
<button id="create-btn">Create PDF</button>
1111

12-
<script src="libs/jspdf.js"></script>
13-
<script src="../dist/jspdf.plugin.autotable.js"></script>
12+
<script src="assets/jspdf.js"></script>
13+
<script src="../dist/jspdf.plugin.autotable.global.js"></script>
1414

1515
<table id="table">
1616
<thead>

0 commit comments

Comments
 (0)