simonbengtsson / jsPDF-AutoTable

jsPDF plugin for generating PDF tables with javascript
https://simonbengtsson.github.io/jsPDF-AutoTable/
MIT License
2.32k stars 625 forks source link

Cannot export more than 2500 rows of table Data into a PDF. #145

Closed RashmiNalwad closed 7 years ago

RashmiNalwad commented 8 years ago

I am trying to export a table with data having more than 2500 rows into a PDF using jsPDF plugin. But it hangs with no exception and no PDF is generated.

Any kind of work around or help is appreciated.

simonbengtsson commented 8 years ago

I once tried generating longer pdfs without much success. Dont remember if it was this plugin or jspdf that broke though. For I can't be of much assistant unfortunately.

simonbengtsson commented 8 years ago

Exactly 2500 btw?

RashmiNalwad commented 8 years ago

I have data around 2700 rows, But when tested even for smaller numbers even 1000 rows is not loading.

simonbengtsson commented 8 years ago

The limit seems to be somewhere around 1000 rows. I have yet to find the reason. If someone decides to look into it it would be much appreciated.

simonbengtsson commented 7 years ago

I successfully tried now with 100 000 rows (3000 pages and 74 MB). I saved it with doc.save("table.pdf") and it took around 10 seconds. Something that did not work however was to display those big pdfs in an iframe in the browser. There seem to be some kind of byte size maximum for this.

If you run into this, it would be much appreciated if you posted here with some code.

santukumar2017 commented 6 years ago

This is working fine for me. Use 'bloburl' instead of 'datauristring'.

Javascript/jquery:

$("#pdf_preview").attr("src", doc.output('bloburl'));

html

best of luck...

simonbengtsson commented 6 years ago

Awesome! Will check it out!

zodman commented 2 months ago

Here some stats:

calling autoTable 50,000 records  20600.31278400123 ms 
calling autoTable 150,000 records  67905.41418499872 ms 
200,000 records blowup! not return ...- JavaScript heap out of memory

using nestjs(backend) 12cpu with 16Gb of ram.