I was working w/ PDF generation in the past, but once I finished that task I wiped everything from memory, bad experience, hacks etc. Back then I thought, hah it's .Net such a crappy environment and tools are not great for this kind of tasks.
But, now I work w/ Python and surprisingly I have even worse experience. Finally got weasprint package but it's already impossible to make it work in AWS Lambda because of environment differences (I use mac to develop), I do not really understand why that library has tons of reference libs, such as cairo, cffi or that or that. Is PDF generation such a complex tasks, or generation in backend, or ...
You can run this node project in an Azure function can convert HTML to PDF. Easy peasy - <a href="https://github.com/marcbachmann/node-html-pdf" rel="nofollow">https://github.com/marcbachmann/node-html-pdf</a>