Options & Hosting

PDF rendering options and document hosting configuration, accepted by/convert,/render, and/compose.

Rendering options

FieldDefaultDescription
page_sizeA4A4, Letter, Legal, Tabloid, A3, A5, or WxH in mm
orientationportraitportrait or landscape
margins.top20mmTop margin (CSS units: mm, in, pt, cm)
margins.right15mmRight margin
margins.bottom20mmBottom margin
margins.left15mmLeft margin
header_htmlHTML header on every page (Puppeteer only)
footer_htmlHTML footer on every page (Puppeteer only)
javascriptfalseExecute JS before rendering (auto-selects Puppeteer)
javascript_delayWait N ms after page load for JS
taggedfalseTagged PDF for accessibility (Rust only)
pdf_profilePDF/A conformance: 1b, 2b, 3b (Rust only)

Hosting options

Enable document hosting to get a public download link. The document is accessible at /d/{token}.

FieldTypeDescription
hosting.enabledbooleanEnable hosted download link
hosting.download_limitnumberMax downloads before returning 410
hosting.expires_innumberSeconds until the link expires
hosting.passwordstringPassword-protect the download page

Engine selection

The Rust engine is used by default. Puppeteer is selected automatically when any of these options are set:javascript: true,header_html,footer_html, orsource: "url". Override explicitly with "engine": "puppeteer".

Options & Hosting - pdfRelay Docs | pdfRelay