Pdfmake: Creating pdf consume high memory

Created on 1 Dec 2017  路  6Comments  路  Source: bpampuch/pdfmake

I am generating 3 tables in my pdf as below:
Table 1 - 2 columns 6 rows
Table 2 - 10 columns 200,000 rows
Table 3 - 2 columns 6 rows

File size - 80MB
Pages - 16,000 pages
Time to generate PDF - 40 minutes
--max-old-space-size = 40000 (MB)

I need to assign 40Gb of memory to generate this PDF and it tooks a long time to generate which is unacceptable. Any way to enhance my current situation?

Most helpful comment

@soohan92, it may be a requirement, but what is the use of this requirement you may also wonder! Think in usability instead of just following requirements. Dare to question it! You can't do anything with a pdf which contains more than 20k rows. No analysis can be conducted, storage of it is sh*t. So first get the use case. Solve the cause of the problem then the problem itself 馃槈

All 6 comments

馃槰 why would you do that in the first place? Who is going through a pdf of 200k+ rows? Isn't it better to export that to a csv/excel/etc. ?

That's the requirement for the project. We did have excel but pdf is also mandatory.

Thread closed but any solution ?

DUPLICATE

@soohan92, it may be a requirement, but what is the use of this requirement you may also wonder! Think in usability instead of just following requirements. Dare to question it! You can't do anything with a pdf which contains more than 20k rows. No analysis can be conducted, storage of it is sh*t. So first get the use case. Solve the cause of the problem then the problem itself 馃槈

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Christian24 picture Christian24  路  3Comments

MathLavallee picture MathLavallee  路  3Comments

michaelqiji picture michaelqiji  路  3Comments

jokris1 picture jokris1  路  3Comments

ValeSauer picture ValeSauer  路  3Comments