mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00

Co-authored-by: marchersimon <50295997+marchersimon@users.noreply.github.com> Co-authored-by: Seth Falco <seth@falco.fun> Co-authored-by: Patrice Denis <patricedenis@users.noreply.github.com>
771 B
771 B
weasyprint
Render HTML to PDF or PNG. More information: https://weasyprint.org/.
- Render a HTML file to PDF:
weasyprint {{path/to/input.html}} {{path/to/output}}.pdf
- Render a 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}}