Docs

Rendering options

Use this page when you need Chromium print or screenshot controls: format, margins, headers and footers, waitUntil, viewport, clip. Field names are identical in JSON, Node, and Python.

Options are endpoint-specific. PDF and images share waitUntil and timeout. Field names in JSON, Node, and Python are the same (printBackground, not print_background).

PDF options

Passed as options on POST /v1/pdf (and stored on templates).

FieldDefaultNotes
formatletterletter, A4, legal, tabloid, or a named Chromium format
landscapefalseRotate the page
printBackgroundtrueInclude CSS backgrounds
preferCSSPageSizefalseHonor @page size in CSS
scale10.1–2
margintop / right / bottom / left as CSS lengths (10mm, 0.5in)
headerTemplate / footerTemplateHTML; enables Chromium headers/footers. Use extra margin so they are not clipped. Placeholders: pageNumber, totalPages, date, title
pageRangese.g. 1-3,5
width / heightCustom page size
waitUntilnetworkidle0Chromium lifecycle
timeoutMilliseconds, max 60000
extraHTTPHeadersSent by Chromium on url fetches
cookiesname, value, optional domain/path/url
waitForSelectorCSS selector or { selector, timeout, visible }
waitForTimeoutExtra wait in ms, max 30000

Image options

Passed as options on POST /v1/images.

FieldDefaultNotes
typepngpng, jpeg, or webp
fullPagefalseCapture the full scrollable page
omitBackgroundfalseTransparent PNG when supported
captureBeyondViewportInclude content outside the viewport
quality1–100, jpeg/webp only
viewportwidth, height, optional deviceScaleFactor
clipx, y, width, height crop
waitUntil / timeoutsame as PDFMilliseconds, max 60000
extraHTTPHeaders / cookies / waitForSelector / waitForTimeoutSame as PDF

Timeouts

options.timeout is the Chromium render budget (max 60s). It is not an SDK HTTP timeout. Jobs that fail to render return render_failed and are not billed.