the tl;dr of using Puppeteer for this is "We run Chrome in a headless mode, load your page, and then print to PDF with it".
It makes me nervous having Chrome running on the server, even inside a container without root. Doubly so if the user is able to control any portion of the page being run by Chrome.