Convert HTML/CSS to PDF documents programmatically
Convert HTML to PDF
weasyprint
$ weasyprint input.html output.pdf
$ weasyprint https://example.com output.pdf
$ weasyprint --stylesheet style.css document.html document.pdf