mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 14:22:07 +02:00
weasyprint: add page (#2367)
This commit is contained in:
parent
0233b61e11
commit
7b6f488770
1 changed files with 23 additions and 0 deletions
23
pages/common/weasyprint.md
Normal file
23
pages/common/weasyprint.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# 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}}`
|
Loading…
Add table
Reference in a new issue