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.

doc.autoTable.previous is undefined

See original GitHub issue

doc.autoTable is not having an attribute “previous”, so I couldn`t find the previous table and set alignment.

I have two tables it should be displayed one after other, I don`t the height of table since it is dynamic.

doc.autoTable(res.columns, res.data, {margin: {top: 80}}); let first = doc.autoTable.previous; doc.autoTable(res1.columns, res1.data, {startY: first.finalY + 10});

The above code is working is codepen but this is giving issues in my project “doc.autoTable.previous;”

Kindly help…

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
tmax-ranjithcommented, May 6, 2021

how to get table height in autoTable

0reactions
l3mu31commented, Feb 16, 2019

let finalY = doc.autoTable.previous.finalY + 10; doc.autoTable(item.columns, item.data, { startY: 130, showHeader: ‘firstPage’, theme: ‘plain’, pageBreak: ‘avoid’, tableWidth: ‘auto’, styles: { font: “helvetica”, overflow: ‘linebreak’, cellPadding: 0, //rowHeight: 80, fillStyle: ‘S’, halign: ‘left’, valign: ‘middle’, fontStyle: ‘normal’, tablelineWidth: 0, fontSize: 10, textColor: 0, tableLineColor: 0, }, }); doc.text(450, finalY + 40, “Total = 15”); in my part… it seems you need to double click it in first attempt. am i getting it wrong?

i need it in first attempt…

any help will be much appreciated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

doc.autotable.previous is undefined in jsPDF - Stack Overflow
I want the text to come under that table after adding a table, but I get the error doc.autotable.previous is undefined .
Read more >
Doc.Autotable.Previous Is Undefined In Jspdf - ADocLib
I have a div with tables and graphs and need export to PDF I used html2canvas.js to create one canvas and use jsPDF.js...
Read more >
jspdf-autotable - npm
Generate pdf tables with javascript (jsPDF plugin). Latest version: 3.5.28, last published: a month ago. Start using jspdf-autotable in your ...
Read more >
simonbengtsson/jsPDF-AutoTable - Gitter
error_handler.js:56 ORIGINAL EXCEPTION: doc. ... Hi! im new to JsPDF, I tried to use Jspdf-Auto table in require js im getting following error...
Read more >
"Cannot read property ID of undefined" when trying to import ...
Get answers fast from Autodesk support staff and product experts in the forums. Visit BIM 360 forum. Find Service Providers. Connect, consult ...
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