Programmatic PDF generation on worker
Hi everyone,
I've been looking for some way to generate PDFs within a worker script.
Currently I use the browser rendering api to create PDFs of a page but according to the dashboard a single invocation takes 6 seconds...
There must be a better and faster way right?
I looked into the javascript PDF libraries (pdfkit, jspdf, pdf-lib, pdfme, etc.) but these are very limited in their features (I cannot even use a bold font?).
I have no experience with Rust but I'm considering this more and more as it seems the only solution?
But before I plunge myself into the deep with learning a bit of Rust, I'm curious if there are any other solutions?
Will I run into the same problems as javascript (limited features)?
Can I improve the speed of puppeteer rendering the PDF?
This function renders the pdf on the worker:
I've been looking for some way to generate PDFs within a worker script.
Currently I use the browser rendering api to create PDFs of a page but according to the dashboard a single invocation takes 6 seconds...
There must be a better and faster way right?
I looked into the javascript PDF libraries (pdfkit, jspdf, pdf-lib, pdfme, etc.) but these are very limited in their features (I cannot even use a bold font?).
I have no experience with Rust but I'm considering this more and more as it seems the only solution?
But before I plunge myself into the deep with learning a bit of Rust, I'm curious if there are any other solutions?
Will I run into the same problems as javascript (limited features)?
Can I improve the speed of puppeteer rendering the PDF?
This function renders the pdf on the worker:
