3 ms·
I put puppeteer into a serverless function and it worked well enough for low tens of thousands of PDFs a day. It's not fast, nor efficient, but it was reliable
by ficklepickle 4y ago
I put puppeteer into a serverless function and it worked well enough for low tens of thousands of PDFs a day. It's not fast, nor efficient, but it was reliable and surprisingly cheap. It was a definite improvement over the existing solution which was a terrible proprietary black box that was occasionally returning the wrong invoice, but that is not saying much. It was an easy drop-in replacement because we were already generating invoices in HTML, so we just sent them to the new PDF service instead.
Something like this is likely much more efficient than launching a whole browser for each PDF.