Puppeteer in Forge

Hello there, I am currently working on a PDF-Export in Atlassian Forge. Since I want to dynamically generate very large PDFs, libraries like jsPDF or html2pdf don’t suit my use case. I like Puppeteer, but I don’t seem to get it working in Forge. I’m using the “chrome-aws-lambda” package, which significantly reduces the size of the chrome dependencies for Puppeteer since AWS-Lambda can only take up to 50 MB.

Does someone know if it is just not possible, or if I have to consider some aspects?

I’m also up for suggestions for PDF generators for Forge. I need an html to pdf conversion.

Thanks in advance,

Hi @AdrianSomesan

The current Forge runtime does not support Puppeteer. This is because some Node.js built-in modules are not supported.

Perhaps, you can try the new native Node.js runtime (EAP)

Please, let me know if the new one works with Puppeteer.



Good advice, @OnucheIdoko1. And I’m also curious if you can get Puppeteer running in the new runtime. :bulb:


While the new runtime should unblock some of the limitations, I’m worried about the computational cost of the task. Both HTML and PDF rendering are expensive operations, which seem likely to hit Forge quotas & limits. The 25s invocation limit might be enough to generate most PDFs but I worry more that your app doesn’t scale well with users, which means it could be bound by the FaaS weekly runtime quota.

Rather than find the right JavaScript library, maybe this is a task better handled by a dedicated PDF service or, if existing services aren’t suitable, then maybe with your own infrastructure, a la the pending Forge remote.


Alright, thank you.
As it happens, I have another copy of the app I’m working on in the EAP of the new runtime. So I’ll give it a try.



Also, I could handle PDF generation on the client machine via CustomUI. I would need a client-based PDF-generation library. But I wouldn’t have to mind the invocation limit nor the Forge Quotas/Limits…