For a proprietary solution, try Prince XML:
For a proprietary solution, try Prince XML:
I previously used WKHTMLTOPDF, but it hasn't been supported for years and doesn't support the latest CSS, etc. It does support JS if you need it, but I'd probably look at headless Chromium or another solution for JS if needed.
Edit: Previous post with some good discussion: https://news.ycombinator.com/item?id=26578826
Yes it costs money. So does developer time.
The maintainers are also very responsive, and helpful.
Amazing project
I tried yesterday. With compliments to the moms of SWE who coded the functionality in firefox. Aparently puting the screen on a pdf page is an insurmontable task in 2025. (20 years ago was still doable). I had to make a screenshot and process the picture to print it.
But, I upvote weasyprint for that instead.
Can't they just render the screen content in a pdf ? Seems easy for other programs to do this.