Parameters
Every parameter supported by /jobs and download.converterer.com/: page settings, margins, render timing, custom sizes, and HTTP auth.
The full set of body parameters accepted by both POST /jobs and POST https://download.converterer.com/. Only url is required.
| Parameter | Type | Default | Description |
|---|---|---|---|
url (required) | string | , | The web address to load and render to PDF. |
landscape | boolean | false | Set to true for landscape orientation. |
margin_top | number or string | 1cm | A bare number is interpreted as inches. Suffix with cm for centimetres. Examples: 1, 1.25, 1.25in, 1.25cm. |
margin_right | number or string | 1cm | Same as margin_top. |
margin_bottom | number or string | 1cm | Same as margin_top. |
margin_left | number or string | 1cm | Same as margin_top. |
page_size | string or object | letter | One of letter, legal, tabloid, ledger, a0–a6 (case-insensitive). Or an object with width and height, see Custom page sizes. |
scale | number 0.1–2 | 1 | Page scale factor. |
screen | boolean | false | Set to true to emulate the screen CSS media type instead of print. |
header_template | string (HTML) | empty | HTML for the page header. Use Chromium’s print classes for dynamic values (<span class="pageNumber"></span>, <span class="totalPages"></span>, <span class="date"></span>, <span class="title"></span>, <span class="url"></span>). |
footer_template | string (HTML) | empty | HTML for the page footer. Same template tokens as header_template. |
wait_network | boolean | false | Wait for network activity to settle before snapshotting. Recommended for client-side frameworks (React, Vue, Angular). |
wait_network_time | integer 0–20 | 2 | Seconds of network inactivity required before capture (only used when wait_network is true). |
wait_time | integer 0–20 | 2 | Fixed wait, in seconds, before snapshotting. |
wait_css_selector | string | not set | Wait for an element matching this CSS selector to appear before snapshotting. |
file_name | string | {id}.pdf | Custom output file name in your destination’s storage. Supports / to nest into directories. The .pdf suffix is strongly recommended. Reusing a name overwrites the existing file. |
attachment | boolean | false | When true, the result URL is served with Content-Disposition: attachment so browsers download instead of inline rendering. |
username | string (requires password) | not set | HTTP Basic Auth username if the target page demands credentials. |
password | string | not set | HTTP Basic Auth password. |
http_success | boolean | false | When true, the job fails with creation_failed if the target URL returns 4xx or 5xx. Default behaviour is to render whatever the page emits regardless of status. |
Custom page sizes
Pass page_size as an object with width and height. Numbers default to inches; strings can use any CSS length unit (in, cm, mm, px, etc.).
Form-encoded:
-d "page_size[width]=8" -d "page_size[height]=11.5"
-d "page_size[width]=210mm" -d "page_size[height]=297mm"
JSON:
{
"url": "https://example.com",
"page_size": { "width": "210mm", "height": "297mm" }
}
Timing parameters in practice
- For mostly-static pages, defaults work fine.
- For SPAs (React, Vue, Angular, etc.), set
wait_network: true. The renderer waits until the network is idle forwait_network_timeseconds before snapshotting. - For pages that finish rendering on a specific element, set
wait_css_selectorto a selector that only appears once the page is fully rendered. This is the most reliable trigger for production use. wait_timeis a fixed delay regardless of what the page does. Useful as a fallback, not a primary trigger.
Header / footer templates
The header and footer templates are HTML fragments rendered into the page margins. They support a small set of template variables that Chromium replaces at render time:
| Token | Replaced with |
|---|---|
<span class="pageNumber"></span> | Current page number |
<span class="totalPages"></span> | Total number of pages |
<span class="date"></span> | Render date |
<span class="title"></span> | Page <title> |
<span class="url"></span> | Source URL |
Keep templates simple: inline CSS only, no JavaScript, no external requests. Chromium renders them in an isolated context.