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
margin—top / right / bottom / left as CSS lengths (10mm, 0.5in)
headerTemplate / footerTemplate—HTML; enables Chromium headers/footers. Use extra margin so they are not clipped. Placeholders: pageNumber, totalPages, date, title
pageRanges—e.g. 1-3,5
width / height—Custom page size
waitUntilnetworkidle0Chromium lifecycle
timeout—Milliseconds, max 60000
extraHTTPHeaders—Sent by Chromium on url fetches
cookies—name, value, optional domain/path/url
waitForSelector—CSS selector or { selector, timeout, visible }
waitForTimeout—Extra 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
captureBeyondViewport—Include content outside the viewport
quality—1–100, jpeg/webp only
viewport—width, height, optional deviceScaleFactor
clip—x, y, width, height crop
waitUntil / timeoutsame as PDFMilliseconds, max 60000
extraHTTPHeaders / cookies / waitForSelector / waitForTimeout—Same 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.