Command-line tool
weasyprint
brew/weasyprint
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Convert HTML to PDF
At a glance
- Type
- Command-line tool
- Install on
- Windows, macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
Windows
pipx install weasyprint scoop install weasyprint
macOS
brew install weasyprint pipx install weasyprint
Linux
brew install weasyprint pipx install weasyprint
Render an HTML file to PDF
weasyprint path/to/input.html path/to/output.pdf
Render an HTML file to PNG, including an additional user stylesheet
weasyprint path/to/input.html path/to/output.png --stylesheet path/to/stylesheet.css
Output additional debugging information when rendering
weasyprint path/to/input.html path/to/output.pdf --verbose
Browse
Related command-line tools
- aha
ANSI HTML adapter - csv-to-html
Convert CSV to HTML table - pdftohtml
Utility which converts PDF files into HTML and XML formats - html2markdown
Convert HTML to Markdown - asciidoctor
Text processor and publishing toolchain for AsciiDoc - htmldoc
Convert HTML to PDF or PostScript - texi2html
Convert TeXinfo files to HTML - man2html
Convert nroff man pages to HTML
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents