weasyprint

Convert HTML/CSS to PDF documents programmatically

brewmacoslinux
Try with needOr install directly
Source

About

Convert HTML to PDF

Commands

weasyprint

Examples

Convert an HTML file to PDF$ weasyprint input.html output.pdf
Convert a web URL to PDF with custom options$ weasyprint https://example.com output.pdf
Convert HTML with CSS styling to PDF$ weasyprint --stylesheet style.css document.html document.pdf