question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

lastAutoTable property in TypeScript

See original GitHub issue

I cant manage to get working the lastAutoTable property in typescript. 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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
simonbengtssoncommented, Oct 2, 2020

You’d have to mark doc as any to use lastAutoTable in typescript (doc as any).lastAutoTable. Let me know if you get any ideas of how this can be improved in the plugin 👌

1reaction
JacobAguilarcommented, Dec 22, 2021

It worked

let posY = (doc as any).lastAutoTable.finalY;

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get the finalY of lastAutoTable in jspdf-autoTable
Property 'lastAutoTable' does not exist on type 'jsPDF '. I tried to import lastAutoTable as, import lastAutoTable from 'jspdf-autotable'; I ...
Read more >
How To Get The Finaly Of Lastautotable In Jspdfautotable - ADocLib
This jsPDF plugin adds the ability to generate PDF tables either by parsing HTML tables or by using Javascript data directly.Check out the...
Read more >
jspdf-autotable-fix-require - npm
lastAutoTable . It has a doc.lastAutoTable.finalY property among other things that has the value of the last printed y coordinate on a page....
Read more >
A brand new website interface for an even better experience!
lastAutoTable property in TypeScript.
Read more >
View Raw - UNPKG
doc.save('table.pdf'); </script> ``` Or if using javascript modules and es6: ```js ... finalY` property among other things that has the value of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found