to-pdf
jetformat html to-pdf page.html -o page.pdf
jetformat html to-pdf ./site -o site.pdf --page-size A4 --landscape
jetformat html to-pdf https://example.com/report -o report.pdf --wait-ready ".report-ready"
| Flag | Meaning |
|---|---|
-o, --output |
Output path. Required for URL input. |
--page-size |
A4, Letter, and other ISO sizes. |
--landscape |
Rotate the page. |
--wait-ready SELECTOR |
Wait until the selector exists. Repeatable. |
--wait-visible SELECTOR |
Wait until the selector is visible. Repeatable. |
--wait DURATION |
Fixed delay before capture, for example 2s. |
--timeout DURATION |
Give up after this long. |
--server HOST:PORT |
Renderer address. Defaults to JETFORMAT_HTML_SERVER or 127.0.0.1:8080. |
--force |
Overwrite an existing output file. |
The renderer service
html to-pdf sends the page to a separate Jetformat HTML renderer. Office and PDF commands do not use it. If the connection fails, the command exits non-zero and nothing is charged. See the help article.