npm
npmjs.com › package › jspdf-autotable
jspdf-autotable - npm
February 26, 2025 - --></table> autoTable(doc, { html: '#my-table' }) // Or use javascript directly: autoTable(doc, { head: [['Name', 'Email', 'Country']], body: [ ['David', '[email protected]', 'Sweden'], ['Castille', '[email protected]', 'Spain'], // ... ], }) doc.save('table.pdf') You can also use the plugin methods directly on the jsPDF documents:
» npm install jspdf-autotable
Published Feb 26, 2025
Version 5.0.2
Author Simon Bengtsson
GitHub
github.com › JonatanPe › jsPDF-AutoTable
GitHub - JonatanPe/jsPDF-AutoTable
Only the drawCell hook can be used with the native style jspdf style changes such as doc.setLineWidth. If you use the other hooks for changing styles, they will be overridden. autoTableHtmlToJson(tableElem, includeHiddenElements) Use it to generate the javascript objects required for this library from an html table (see from html example).
Starred by 17 users
Forked by 4 users
Languages TypeScript 81.5% | JavaScript 18.5%
Videos
14:12
jsPDF-Autotable Tutorial to Add Dynamic Nested HTML5 ...
12:28
jsPDF-Autotable Project to Add Images inside Table Rows ...
07:19
jsPDF-Autotable Tutorial to Insert Array of JSON Objects Data ...
05:36
jsPDF-Autotable Tutorial To Add Colorful Border to Header ...
jsPDF-Autotable Tutorial to Add Dynamic Tables in PDF ...
Build a Next.js jsPDF-Autotable HTML to PDF Web App to ...
CodePen
codepen.io › tag › jspdf-autotable
Pens tagged 'jspdf-autotable' on CodePen
CodePen doesn't work very well without JavaScript · We're all for progressive enhancement, but CodePen is a bit unique in that it's all about writing and showing front end code, including JavaScript. It's required to use most of the features of CodePen · Need to know how to enable it?
JSFiddle
jsfiddle.net › lsimpson › yrk2ofxt › 83
jspdf-autotable example - JSFiddle - Code Playground
JSFiddle - Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle.
CodeSandbox
codesandbox.io › examples › package › jspdf-autotable
jspdf-autotable examples - CodeSandbox
Use this online jspdf-autotable playground to view and fork jspdf-autotable example apps and templates on CodeSandbox.
jsDocs.io
jsdocs.io › package › jspdf-autotable
[email protected] - jsDocs.io
February 26, 2025 - type autoTableInstanceType = (options: UserOptions) => void; type CellHook = (data: CellHookData) => void | boolean; type CellInput = null | string | string[] | number | boolean | CellDef; ... No dependencies. ... To add a badge like this oneto your package's README, use the codes available below. You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/jspdf-autotable.
Stack Overflow
stackoverflow.com › questions › tagged › jspdf-autotable
Newest 'jspdf-autotable' Questions - Stack Overflow
Currently, I am using jsPDF and pdf-autotable to generate the pdf programmatically using the object data. I am using Amiri font and converted to base64 which gives me a js file.
UNPKG
unpkg.com › jspdf-autotable
jspdf-autotable
Generate pdf tables with javascript (jsPDF plugin) · simonbengtsson.github.io/jsPDF-AutoTable
cdnjs
cdnjs.com › home › libraries › jspdf-autotable
jspdf-autotable - Libraries - cdnjs - The #1 free and open source CDN built to make life easier for developers
jspdf-autotable · Generate PDF tables with jsPDF · 2k · GitHub · MIT licensed · Tags: pdf, table, jspdf · Version · 5.0.2 · Loading... Asset Type · All · Loading... https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/5.0.2/jspd...
npm
npmjs.com › package › jspdf
jspdf - npm
4 weeks ago - PDF Document creation from JavaScript. Latest version: 3.0.4, last published: 17 days ago. Start using jspdf in your project by running `npm i jspdf`. There are 2036 other projects in the npm registry using jspdf.
» npm install jspdf
Published Nov 19, 2025
Version 3.0.4
Repository https://github.com/parallax/jsPDF
Homepage https://github.com/parallax/jsPDF
GitHub
github.com › simonbengtsson › jsPDF-AutoTable
GitHub - simonbengtsson/jsPDF-AutoTable: jsPDF plugin for generating PDF tables with javascript
--></table> autoTable(doc, { html: '#my-table' }) // Or use javascript directly: autoTable(doc, { head: [['Name', 'Email', 'Country']], body: [ ['David', '[email protected]', 'Sweden'], ['Castille', '[email protected]', 'Spain'], // ... ], }) doc.save('table.pdf') You can also use the plugin methods directly on the jsPDF documents:
Starred by 2.5K users
Forked by 637 users
Languages TypeScript 89.5% | HTML 7.6% | JavaScript 2.9%
Appsmith
community.appsmith.com › tutorial › data-driven-pdf-generator-jspdf-and-autotable
Data-Driven PDF Generator with JSPDF and Autotable | Appsmith Community Portal
October 12, 2024 - In this guide, we'll be using the JSPDF library and the JSPDF-AutoTable plug-in to generate PDFs from customer order data. This method builds a PDF programmatically, one line at a time, as opposed to other methods that use a template or HTML. Using this approach, you can input data from any Appsmith datasource, and transform it with JavaScript to generate a PDF from the live data.
Top answer 1 of 9
19
Just delete the 2 first line of imports and add the following lines:
import { jsPDF } from 'jspdf';
import { autoTable } from 'jspdf-autotable';
autoTable(doc, { ... })
You can see an example here
2 of 9
3
i was geting same issue and I fixed it like this:
import jsPDF from '../../node_modules/jspdf/dist/jspdf.umd.min.js'
import { applyPlugin } from 'jspdf-autotable'
applyPlugin(jsPDF)
i use "jspdf": "^2.3.1", "jspdf-autotable": "^3.5.20" i hope it helps you!
Top answer 1 of 11
15
Is working for me Angular 5.
To work with jspdf-autotable in angular 5, one must install jspdf and jspdf-autotable via npm
npm install jspdf --save
npm install @types/jspdf --save-dev
npm install jspdf-autotable --save
also add the jspdf and jspdf-autotable files to the scripts array in angular-cli.json
"scripts": [
"../node_modules/jspdf/dist/jspdf.min.js",
"../node_modules/jspdf-autotable/dist/jspdf.plugin.autotable.js"
],
and in component never import jspdf or jspdf-autotable just.
Forget about the following import.
import * as jsPDF from 'jspdf';
import 'jspdf-autotable';
Just use Before @Component:
declare var jsPDF: any;
Your component (related parts ):
declare var jsPDF: any;
@Component({
selector: "energy-login",
templateUrl: "./login.component.html",
styleUrls: ["./login.component.scss"]
})
export class MyComponent implements OnInit {
constructor() {}
ngOnInit() {}
downloadPDF() {
let columns = ["ID", "Name", "Country"];
let rows = [
[1, "Shaw", "Tanzania"],
[2, "Nelson", "Kazakhstan"],
[3, "Garcia", "Madagascar"],
];
let doc = new jsPDF('l', 'pt');
doc.autoTable(columns, rows); // typescript compile time error
doc.save('table.pdf');
}
}
2 of 11
12
I was able to please TypeScript like this:
import jsPDF from 'jspdf';
import 'jspdf-autotable';
import { UserOptions } from 'jspdf-autotable';
interface jsPDFWithPlugin extends jsPDF {
autoTable: (options: UserOptions) => jsPDF;
}
...
const doc = new jsPDF('portrait', 'px', 'a4') as jsPDFWithPlugin;
doc.autoTable({
head: [['Name', 'Email', 'Country']],
body: [
['David', '[email protected]', 'Sweden'],
['Castille', '[email protected]', 'Norway']
]
});
Works in Angular 7 (also works in Angular 14)
Simonbengtsson
simonbengtsson.github.io › jsPDF-AutoTable
AutoTable sample
It appears you don't have PDF support in this web browser. Click here to download the PDF