Headless chrome and a print-to-pdf are the way to go, here. There’s a library (whose name eludes me) which wraps it all up very nicely in a JS lib. If you’ve got the html, generating a pdf automatically shouldn’t be more than one screen of code and a docker container.
Edit: the lib is puppeteer. https://github.com/GoogleChrome/puppeteer/