jsPDF AutoTable - autoTable is not a function jsPDF AutoTable - autoTable is not a function angularjs angularjs

jsPDF AutoTable - autoTable is not a function


Just delete the 2 first line of imports and add the following lines:

var jsPDF = require('jspdf');require('jspdf-autotable');

You can see an example here


I was getting same issue and This one is worked for me.i have written it in import as

import * as jsPDF from 'jspdf';import 'jspdf-autotable';

And in function i declared it as

const doc = new jsPDF();


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!