How to create a PDF file with 15.000 pages, preferably with a Stream as an input and output, to prevent memory issues.
| Name | Stream | Complexity (1-5) | Time (s) | Memory (mb) | O.P. (mb) |
|---|---|---|---|---|---|
| pdfmake | N | 2 | Infinite | 500 | None |
| pdfkit | Y | 5 | 10 | 300 | None |
| pdfjs | Y | 3 | 18 | 700 | None |
| wkhtmltopdf | N | HTML | 83 | 100 | 300 |
| puppeeter | N | HTML | 44 | 190 | 300 |
Infinite: Didn't finish.
As my tests indicates, pdfkit and pdfjs could probably consume the memory up to the limit without blowing up, maybe because of the Stream backpressure?