1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-31 21:35:30 +02:00
tldr/pages/common/weasyprint.md
Starbeamrainbowlabs 45ec3033c0
Revert "multiple pages: add homepages"
This reverts commit 347e557303.
2018-12-19 23:33:18 +00:00

23 lines
724 B
Markdown

# weasyprint
> Render HTML to PDF or PNG.
- 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}}`