The following worked for me in Angular 11, jsPDF 2.3.1, jspdf-autotable 3.5.14:

import jsPDF from 'jspdf'
import autoTable from 'jspdf-autotable'
  
public printTable() {

    const doc = new jsPDF('l', 'mm', 'a4'); 
    
    const head = [['ID', 'Country', 'Index', 'Capital']]
    const data = [
        [1, 'Finland', 7.632, 'Helsinki'],
        [2, 'Norway', 7.594, 'Oslo'],
        [3, 'Denmark', 7.555, 'Copenhagen'],
        [4, 'Iceland', 7.495, 'Reykjavík'],
        [5, 'Switzerland', 7.487, 'Bern'],
        [9, 'Sweden', 7.314, 'Stockholm'],
        [73, 'Belarus', 5.483, 'Minsk'],
    ]

    autoTable(doc, {
        head: head,
        body: data,
        didDrawCell: (data) => { },
    });

    doc.save('table.pdf');
}
Answer from John Chandler on Stack Overflow
🌐
GitHub
github.com › simonbengtsson › jsPDF-AutoTable › issues › 297
Property 'autoTable' does not exist on type jsPDF · Issue #297 · simonbengtsson/jsPDF-AutoTable
November 17, 2017 - import * as jsPDF from 'jspdf'; import * as autoTable from 'jspdf-autotable';
Published   Nov 17, 2017
🌐
GitHub
github.com › simonbengtsson › jsPDF-AutoTable › issues › 707
not compatible with jsPDF 2.0.0 - Property 'autoTable' does not exist on type 'jsPDF' · Issue #707 · simonbengtsson/jsPDF-AutoTable
May 31, 2020 - Hello, I tried to use jsPDF-AutoTable with jsPDF 2.0.0 but I cant find the way to solve the following compile error: Property 'autoTable' does not exist on type 'jsPDF' ` import jsPDF from 'jspdf'; import 'jspdf-autotable'; ... const doc...
Published   Aug 15, 2020
🌐
npm
npmjs.com › package › jspdf-autotable
jspdf-autotable - npm
<script src="jspdf.min.js"></script> <script src="jspdf.plugin.autotable.min.js"></script> <script> const doc = new jsPDF() doc.autoTable({ html: '#my-table' }) doc.save('table.pdf') </script> Checkout more examples in examples.js which is also the source code for the demo documents. Below is a list of all options supported in the plugin. All of them are used in the examples. The only thing required is either the html or body option. If you want more control over the columns you can specify the columns property.
      » npm install jspdf-autotable
    
Published   Feb 26, 2025
Version   5.0.2
Author   Simon Bengtsson
🌐
GitHub
github.com › simonbengtsson › jsPDF-AutoTable › issues › 324
autoTable does not exist on type jsPDF · Issue #324 · simonbengtsson/jsPDF-AutoTable
February 5, 2018 - dowloadPDF() { let doc = new jsPDF('p', 'pt'); let columns = [ {title: "ID", dataKey: "id"}, {title: "Name", dataKey: "name"}, {title: "Country", dataKey: "country"}, ]; let rows = [ {"id": 1, "name": "Shaw", "country": "Tanzania"}, {"id": 2, "name": "Nelson", "country": "Kazakhstan"}, {"id": 3, "name": "Garcia", "country": "Madagascar"}, ]; // Error ======================== doc.autoTable(columns, rows); doc.save('teste.pdf'); }
Published   Feb 05, 2018
🌐
Lightrun
lightrun.com › answers › simonbengtsson-jspdf-autotable--property-autotable-does-not-exist-on-type-jspdf
Property 'autoTable' does not exist on type jsPDF
I have console the doc object and found autoTable exists there but don’t know why it is creating error? ... instead of doc.autoTable, For angular, you can use, autoTable(doc, { html: ‘#html-table-id’,startY: 30, }); " You can also use the exported autoTable method. This works better with typescript and alternative jsPDF versions.
🌐
Netlify
answers.netlify.com › support
jspdf-autoTable Library only does not work in deployment - Support - Netlify Support Forums
May 31, 2023 - I have a problem importing the jspdf-autoTable library, when working from localhost it works correctly but when uploading the page it tells me react_devtools_backend_compact.js:2367 The data should be an object or array, is: undefined. My site name is: https://cerimonial-pr.netlify.app/
🌐
GitHub
github.com › simonbengtsson › jsPDF-AutoTable › issues › 390
Property 'autoTable' does not exist on type 'jsPDF' · Issue #390 · simonbengtsson/jsPDF-AutoTable
Hi I got error Property 'autoTable' does not exist on type 'jsPDF' in angular 5 I installed jspdf and jspdf-autotable package.json file { "name": "gradsiren-ui", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng...
Find elsewhere
🌐
Lightrun
lightrun.com › answers › simonbengtsson-jspdf-autotable-not-compatible-with-jspdf-200---property-autotable-does-not-exist-on-type-jspdf
not compatible with jsPDF 2.0.0 - Property 'autoTable' does not exist on type 'jsPDF'
As an alternative, you could create an interface wrapping the autoTable plugin. This effectively does the same, its just (imo) prettier: import { jsPDF } from "jspdf"; import 'jspdf-autotable'; import { UserOptions } from 'jspdf-autotable'; ...
🌐
GitHub
github.com › simonbengtsson › jsPDF-AutoTable › issues › 677
doc.autoTable Doesn't work · Issue #677 · simonbengtsson/jsPDF-AutoTable
any Property 'autoTable' does not exist on type 'jsPDF'. I have seen a couple of solutions to address this, but I want a proper solution not like declare var jsPDF: any; hack. Thanks.!
Published   Jun 17, 2020
Author   donqq
🌐
GitHub
github.com › simonbengtsson › jsPDF-AutoTable › issues › 728
lastAutoTable property in TypeScript · Issue #728 · simonbengtsson/jsPDF-AutoTable
June 27, 2020 - I'm using the autotable exported method as it says in the docs ( import autoTable from 'jspdf-autotable'; ) and creating my table with autoTable(doc, options); I need to get the final Y of the last autotable for multiple tables. With doc.lastAutoTable.finalY it says that lastAutoTable property does not exist on type jsPDF.
Published   Sep 30, 2020
Top answer
1 of 1
1

The reason why you got an error saying Property 'autoTableEndPosY' does not exist on type 'jsPDF' is because you have incorrect imports - you should have imported everything from jspdf-autotable not only autoTable - like so:

import {jsPDF} from 'jspdf';
import 'jspdf-autotable';

Also, clearly you need to understand there are 2 different ways how you can generate a PDF file with jspdf-autotable. As of the latest version of jspdf-autotable it's possible to generate a PDF from both front-end (via normal JS) and back-end (via NodeJS):

A) FRONT-END

Using jspdf-autotable on the fron-end is easy. You don't need to instal any packages, just put these scripts into your <html>:

<script src="https://simonbengtsson.github.io/jsPDF-AutoTable/examples/libs/jspdf.umd.js"></script>
<script src="https://simonbengtsson.github.io/jsPDF-AutoTable/dist/jspdf.plugin.autotable.js"></script>

In your index.html you need to have a <table id="your-table-id"> that you want to print out as a PDF. Then, in <script> you simply put html: '#your-table-id' like in my DEMO HERE:

doc.autoTable({
    html: '#your-table-id'
});

Inserting images into you tables from the fron-end is easy too - DEMO HERE.

B) BACK-END

Generating a PDF with jspdf-autotable from the back-end is a bit more complicated because you are not in a browser environment, thus html: '#your-table-id' will NOT work.

First import the packages correctly:

import {jsPDF} from 'jspdf';
import 'jspdf-autotable';

Then, in order to create a table in your PDF, you have to supply doc.autoTable() with an array of values for table headings (<th>s) and table data (<td>s). Also, inserting images into your tables is a real headache because you have to specify coordinates for each image and all images are treated as absolutely positioned elements - DEMO HERE - in the terminal run the script via node index.js

import { jsPDF } from 'jspdf';
import 'jspdf-autotable';

const downloadPdf = () => {
  const doc = new jsPDF('p', 'pt', 'a4');

  const thead = [['ID', 'Name', 'Photo']];
  const tbody = [
    [1, 'Johnny', ''],
    [2, 'Jenny', ''],
  ];
  const imagesData = [
    {
      x: 365,
      y: 65,
      src: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4gKgSUNDX1BST0ZJTEUAAQEAAAKQbGNtcwQwAABtbnRyUkdCIFhZWiAH3QAIAA4AFgAoAB1hY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtkZXNjAAABCAAAADhjcHJ0AAABQAAAAE53dHB0AAABkAAAABRjaGFkAAABpAAAACxyWFlaAAAB0AAAABRiWFlaAAAB5AAAABRnWFlaAAAB+AAAABRyVFJDAAACDAAAACBnVFJDAAACLAAAACBiVFJDAAACTAAAACBjaHJtAAACbAAAACRtbHVjAAAAAAAAAAEAAAAMZW5VUwAAABwAAAAcAHMAUgBHAEIAIABiAHUAaQBsAHQALQBpAG4AAG1sdWMAAAAAAAAAAQAAAAxlblVTAAAAMgAAABwATgBvACAAYwBvAHAAeQByAGkAZwBoAHQALAAgAHUAcwBlACAAZgByAGUAZQBsAHkAAAAAWFlaIAAAAAAAAPbWAAEAAAAA0y1zZjMyAAAAAAABDEoAAAXj///zKgAAB5sAAP2H///7ov///aMAAAPYAADAlFhZWiAAAAAAAABvlAAAOO4AAAOQWFlaIAAAAAAAACSdAAAPgwAAtr5YWVogA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h4eHh4eHh4eHv/AABEIABgAGAMBIgACEQEDEQH/xAAXAAEBAQEAAAAAAAAAAAAAAAAABwYI/8QAJxAAAQMEAQMDBQAAAAAAAAAAAQIDBAAFBhEhEiIxBxNBFjJRYXH/xAAZAQACAwEAAAAAAAAAAAAAAAAAAwEEBQb/xAAjEQABAwMDBQEAAAAAAAAAAAABAAIDBAUREjHBITJBUWHR/9oADAMBAAIRAxEAPwDbTM5x+0YE5lYlx7hEZ6W1JhyEOkvK8NbBICufn4BNS+7et31DZJlonW6Lbo01Pt+83KJcbTvfIOgeBo615qNYplFvhTDCessNmySnEiWw2pXU5pCkpWVkk7T1E8Ac7/NVbJIuGW7DlS4NsTCQ5BLSAqO2tEpSk9ijvvQrz3A62N6oqbjI7DCN1bp7fGdUgcOiy8eEJLYmwVbbcOkFKu0jyRz92tUpiubWGBbXrbd8MiSYpTpo2+c7HU0oAd/QSpClk8lSgfNKNZyoGMbKRpRw4jWlAbT+q6Q9EfTy85RhMJN7aadQ06JVvZkOnpcaI0UqPI6SeQn+71ulKWWhz2tPn8KZTjuPocrO5xYo87KH3I9si2dMhKBHaRFUlKhyknpA7TxsnQApSlZVRVyQENaustVvpauMulYMj6Rzhf/Z',
    },
  ];

  doc.autoTable({
    head: thead,
    body: tbody,
    startY: doc.autoTableEndPosY + 5,
  });

  // Add images
  for (let i = 0; i < imagesData.length; i++) {
    const image = imagesData[i];
    const dimensionX = 15;
    const dimensionY = 15;
    doc.addImage(image.src, 'JPEG', image.x, image.y, dimensionX, dimensionY);
  }

  const timestamp = new Date().getTime();

  doc.save('table_' + timestamp + '.pdf');
};

downloadPdf();
🌐
CopyProgramming
copyprogramming.com › howto › property-autotable-does-not-exist-on-type-jspdf
Type jspdf lacks property autotable - Javascript
May 11, 2023 - The reason for this error is that Typescript is a strongly typed language, and lastAutoTable is not defined in the index.d.ts file, which is located under the jsPdf node module. For Angular 11, jsPDF 2.3.1, and jspdf-autotable 3.5.14, the first solution worked for me.
🌐
Githubhot
githubhot.com › repo › simonbengtsson › jsPDF-AutoTable › issues › 707
not compatible with jsPDF 2.0.0 - Property 'autoTable' does not exist on type 'jsPDF' - bytemeta
(doc as jsPDF & { autoTable: autoTable }).autoTable({ head: [columnsTitles], body: this.source as RowInput[], (...) }); ... As an alternative, you could create an interface wrapping the autoTable plugin.
🌐
bleepCoder
bleepcoder.com › jspdf-autotable › 362200513 › property-autotable-does-not-exist-on-type-jspdf
jsPDF-AutoTable 🚀 - Property 'autoTable' does not exist on type 'jsPDF' | bleepcoder.com
I think this error is caused because we are creating a new object from the jsPDF and we're trying to access the autoTable method by using that object and JsPdf does not own this property | method, I think the solution here is to create an object from jspdf-autotable library itself, but I don't know how to import this lib in angular 7! thanks, ... Hi @Furqanaa, I working in Angular 8 and I have the same error, in DEV environment that solution work properly but when I try compile for PROD environment I get the same problem during the compilation process · "Property 'autoTable' does not exist on type 'jsPDF'."
🌐
Itecnote
itecnote.com › tecnote › javascript-property-autotable-does-not-exist-on-type-jspdf
Javascript – Property 'autoTable' does not exist on type jsPDF
Skip to content · React-native – React Native Error: “Animated.event now requires a second argument for options” · Python – keep on getting “x and y must have same first dimension, but have shapes (100,) and (1, 100)” · Java – Docker WARNING: Published ports are discarded when ...