bpampuch / pdfmake

Client/server side PDF printing in pure JavaScript
http://pdfmake.org
Other
11.7k stars 2.04k forks source link

Generate PDF document with table rows 40000 (AWS Lambda and NodeJs) #2469

Open BKSnake opened 2 years ago

BKSnake commented 2 years ago

I'm trying to generate pdf document with table which has 40000 rows. the pdf generation takes over 15 minutes.

Using in NodeJs and run it on AWS Lambda

"pdfmake": "^0.2.5",

mandaputtra commented 2 years ago

15 minutes are expected. I don't think 40K row presented on PDF file are a good idea. If you still want it, I suggest just create an HTML page out of your data and use puppeteer to convert it to PDF or better just serve HTML and make user use window.print()

BKSnake commented 2 years ago

What about 0.3-beta-2?

BKSnake commented 2 years ago

15 minutes are expected. I don't think 40K row presented on PDF file are a good idea. If you still want it, I suggest just create an HTML page out of your data and use puppeteer to convert it to PDF or better just serve HTML and make user use window.print()

Also i if you looked. My code run on AWS Lambda and use Nodejs. window.print() - good joke.

timothyerwin commented 2 years ago

you can use puppeteer to generate a pdf with chromium on node.js server side...the downside I think is the pdf is screenshots so no text selection