I am using JSPDF and Auto-table plugin for multiple tables. but when table height increase from one page 2nd table overlap on 1st table. here is my code
http://jsbin.com/jugusoqici/edit?html,js,console,output
Please can you tell me what is going wrong? Check 2nd table overlapping to 1st table on 2nd page.
Thanks
i have resolved myself. Thanks for not supporting:-)
@Farrukhzaman so how you solved it?
look here.
http://jsbin.com/kotunowige/edit?html,js,output
Hi there,
There's now a html2pdf example which much better supports generating documents from HTML.
Get the latest master and try:
npm install
npm start
Then visit http://localhost:8000/jsPDF/examples/html2pdf/tables.html
Hope this works well for you :)
Many thanks,
James
@MrRio Would be nice if you could update the live examples site with these updates :)
add
var doc = new jsPDF('p','pt','A4');
var res = doc.autoTableHtmlToJson(document.getElementById('tbl2'),true);
doc.autoTable(res.columns, res.data ,options,{startY: doc.autoTableEndPosY() + 50,
pageBreak: 'auto'});
var res1 = doc.autoTableHtmlToJson(document.getElementById('tbl1'),true);
doc.addPage();
doc.autoTable(res1.columns, res1.data,options1,{startY: doc.autoTableEndPosY() + 50,
pageBreak: 'auto'});
doc.save('table.pdf');
what is pt in in new jsPDF('p','pt','A4'); means ??
i want to add startX and endX is it possible to do that same as startY and end Y
Most helpful comment
i have resolved myself. Thanks for not supporting:-)