Jspdf-autotable: Cannot read property 'getFontSize' of undefined

Created on 30 Apr 2020  路  10Comments  路  Source: simonbengtsson/jsPDF-AutoTable

Hi, I've added jsPDF-AutoTable on my project (Angular 9) yesterday and encountered this issue.

image

import jsPDF from 'jspdf';
import autoTable from 'jspdf-autotable';

const doc = new jsPDF('l', 'pt', 'letter');
autoTable(doc, {
body: this.items.getValue(),
columns: this.columns.map(a => ({ header: a.headerName, dataKey: a.field }))
});

Most helpful comment

Released 3.5.3 now that hopefully fixes this issue. Can you see if it works for you?

All 10 comments

Can you check the version?

Version:

"jspdf": "^1.5.3",
"jspdf-autotable": "^3.5.2",

I have the same problem

    "jspdf": "^1.5.3",
    "jspdf-autotable": "^3.5.2",

image

image

startY: 70 - will cause the error but if I adjust it to 75 and up, it's working

Oh. This is most likely fixed on master. Will release npm version asap.

Released 3.5.3 now that hopefully fixes this issue. Can you see if it works for you?

Confirmed working now for version 3.5.3. Thank you so much.

Btw, how is the new autoTable(doc, {/* options */}) syntax working for you? Any issues with types or something else getting started?

image

image

I haven't encountered any issues yet. It is working fine. :)

It's working. Thank you so much.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cplaiu picture cplaiu  路  3Comments

AminBangash picture AminBangash  路  5Comments

sirishasd picture sirishasd  路  4Comments

azakordonets picture azakordonets  路  5Comments

Alorse picture Alorse  路  4Comments