1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-23 19:44:10 +02:00
tldr/pages/common/weasyprint.md
Managor 99c7af4917
*: use a more specific more info link, org domain (#17699)
Mass update for more specific "more info" links
2025-08-16 11:12:49 -07:00

24 lines
833 B
Markdown

# 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 {{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`
- Specify a custom resolution when outputting to PNG:
`weasyprint {{path/to/input.html}} {{path/to/output.png}} --resolution {{300}}`
- Specify a base URL for relative URLs in the input HTML file:
`weasyprint {{path/to/input.html}} {{path/to/output.png}} --base-url {{url_or_filename}}`