Convert HTML to PDF
Renders html to a PDF with the chosen engine. Remote images, stylesheets and fonts are fetched and inlined first; one that cannot be fetched is skipped and counted in X-Skipped-Resources. Send the request to the host of your project's region, api.eu.revecto.dev, api.us.revecto.dev or api.apac.revecto.dev; see Regions.
ApiKeyAuthAuthorizationBearer <opaque>API key passed as Bearer token (e.g. rvt_...).
application/json- body
html*stringComplete HTML document to render. Remote images, stylesheets and fonts it references are fetched before rendering.
engine*EngineRendering engine, required on every render, with no default.
chromiumrenders the document in a full browser engine and supports the CSS a current browser prints; it is the slower engine. It prints@pagemargin boxes withcounter(page)andcounter(pages), and repeats aposition: fixedelement on every page.formelays the document out without a browser: it is faster and supports a subset of HTML and CSS. A document outside that subset, including any character no available font covers (Arabic, Hebrew, Thai, Devanagari and monochrome emoji are covered by built-in fonts; for Chinese, Japanese and Korean link a Google Fonts stylesheet or register a TrueType font; color emoji are not available; Arabic-Indic and Persian digits are refused because Forme draws them in reverse order), is refused with422 document not supported by the forme engine, whoseunsupportedfield lists what was not supported.
"forme""chromium"options?Page setup for a render. Every property is optional; an omitted one takes its default. An invalid value is refused with 400 invalid request body: <cause>, and a property not listed here with 400 invalid request body: unknown option: <name>.
The PDF document; the body is binary.
response?fileapplication/pdfbinarycurl -X POST 'https://api.eu.revecto.dev/v1/convert' \ -H 'Content-Type: application/json' \ -d '{ "engine": "chromium", "html": "<html><body><h1>Invoice INV-2026-0042</h1></body></html>", "options": { "paper_size": "A4", "landscape": false }}'"<binary PDF>"