When generating a PDF containing a large number of images (30–40+), the Node.js process memory usage (RSS) jumps dramatically from ~128 MB to ~1280 MB or higher, eventually leading to an Out-of-Memory crash or the app becoming unresponsive.
Environment
pdfmake version: 0.2.20
Node.js version: 22.14.0
OS: Test on both window and linux
Here is example code
const printer = new PdfPrinter(fonts);
let pdfDoc = await createPDF({
reports: { data },
});
const uploadPromise = bunnyStorage.uploadStream(pdfDoc, 'example.pdf');
pdfDoc.end();
await uploadPromise;
When generating a PDF containing a large number of images (30–40+), the Node.js process memory usage (RSS) jumps dramatically from ~128 MB to ~1280 MB or higher, eventually leading to an Out-of-Memory crash or the app becoming unresponsive.
Environment
pdfmake version: 0.2.20
Node.js version: 22.14.0
OS: Test on both window and linux
Here is example code
const printer = new PdfPrinter(fonts);
let pdfDoc = await createPDF({
reports: { data },
});
const uploadPromise = bunnyStorage.uploadStream(pdfDoc, 'example.pdf');
pdfDoc.end();
await uploadPromise;