Working with PDF files
Generating PDF files
To generate PDF:
<script src="https://unpkg.com/[email protected]/dist/jspdf.umd.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/jspdf.plugin.autotable.js"></script>const doc = new jspdf.jsPDF();
doc.autoTable({
head: [['ID', 'Name', 'Email', 'Bio']],
body: {{ui.table.value}}.map(({ id, fullName, email, bio }) => ([id, fullName, email, bio])),
});
doc.save('users.pdf');Downloading PDF with a JS code action
Printing PDF files
To print PDF:
Last updated
Was this helpful?