xhtml2pdf

Convert HTML and CSS to PDF documents programmatically.

pipmacoslinuxwindows
Try with needOr install directly
Source

About

PDF generator using HTML and CSS

Commands

xhtml2pdf

Examples

convert HTML file to PDF$ xhtml2pdf input.html output.pdf
generate PDF from HTML with custom styling$ xhtml2pdf --format A4 input.html output.pdf
batch convert multiple HTML files to PDF$ for file in *.html; do xhtml2pdf "$file" "${file%.html}.pdf"; done
create PDF from HTML string with inline CSS$ echo '<html><body><h1>Hello</h1></body></html>' | xhtml2pdf /dev/stdin output.pdf
convert HTML with external stylesheets to PDF$ xhtml2pdf template.html report.pdf