Looking for a HTML to PDF library

I am writing this SPA (Single Page App). The code runs in the browser as javascrpt. I have found a library/code to covert the html to pdf.

However, I would rather not bulk up this code.

I was wondering if there might a Delphi library around that would take a URL and produce a PDF. I can then get the Windows server to do this.

I understand wanting a Delphi solution, but maybe a python script would do it easily?

CEF4Delphi (Chromium Embedded Framework) ?

Could that simply be “Print to PDF printer”?

Thats what it is by default, but not user friendly.

Thanks, I havent used python before.

I have used PHP extensively. I didnt really want yet another language for the server side.

Thanks John, I looked at it after your post. In the mean time I had decided to call chrome.exe to do it. I got Claude to list down the possible issues so I could mitigate them in my code.

Then I got Claude to look into CEF4, and it has the same issues reported that I will encounter by calling Chrome directly. The only thing is you don’t need is Chrome installed. Since I have full control of the AWS server, thats not an issue.

So I decided that there was no advantage to using this library.