weasyprint
Render HTML to PDF or PNG. More information: https://doc.courtbouillon.org/weasyprint/stable/api_reference.html#command-line-api.
- Render an HTML file to PDF:
weasyprint
- Render an HTML file to PNG, including an additional user stylesheet:
weasyprint --stylesheet
- Output additional debugging information when rendering:
weasyprint --verbose
- Specify a custom resolution when outputting to PNG:
weasyprint --resolution
- Specify a base URL for relative URLs in the input HTML file:
weasyprint --base-url
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
