Log In Sign Up

Docs

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.

ParameterTypeDefaultDescription
url (required)string,The web address to load and render to PDF.
landscapebooleanfalseSet to true for landscape orientation.
margin_topnumber or string1cmA bare number is interpreted as inches. Suffix with cm for centimetres. Examples: 1, 1.25, 1.25in, 1.25cm.
margin_rightnumber or string1cmSame as margin_top.
margin_bottomnumber or string1cmSame as margin_top.
margin_leftnumber or string1cmSame as margin_top.
page_sizestring or objectletterOne of letter, legal, tabloid, ledger, a0a6 (case-insensitive). Or an object with width and height, see Custom page sizes.
scalenumber 0.121Page scale factor.
screenbooleanfalseSet to true to emulate the screen CSS media type instead of print.
header_templatestring (HTML)emptyHTML 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_templatestring (HTML)emptyHTML for the page footer. Same template tokens as header_template.
wait_networkbooleanfalseWait for network activity to settle before snapshotting. Recommended for client-side frameworks (React, Vue, Angular).
wait_network_timeinteger 0202Seconds of network inactivity required before capture (only used when wait_network is true).
wait_timeinteger 0202Fixed wait, in seconds, before snapshotting.
wait_css_selectorstringnot setWait for an element matching this CSS selector to appear before snapshotting.
file_namestring{id}.pdfCustom 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.
attachmentbooleanfalseWhen true, the result URL is served with Content-Disposition: attachment so browsers download instead of inline rendering.
usernamestring (requires password)not setHTTP Basic Auth username if the target page demands credentials.
passwordstringnot setHTTP Basic Auth password.
http_successbooleanfalseWhen 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 for wait_network_time seconds before snapshotting.
  • For pages that finish rendering on a specific element, set wait_css_selector to a selector that only appears once the page is fully rendered. This is the most reliable trigger for production use.
  • wait_time is a fixed delay regardless of what the page does. Useful as a fallback, not a primary trigger.

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:

TokenReplaced 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.