Skip to main content
Render HTML to a PDF preview

Authorizations

token
string
query
required

Standard authorization for most API calls. This token identifies the logged-in user and their permissions. It is obtained either as a temporary token after a successful login or as a long-term API key.

Body

application/json
html
string | null
required

HTML to render, with the styling it needs included. Dangerous markup is stripped before it reaches the renderer.

Example:

"<!doctype html><html lang=en><head><meta charset=utf-8><title>New Form</title></head><body><p style=\\\"color:red;\\\">Form content</p></body></html>"

fileName
string

Name to offer the file under. A .pdf extension is appended when missing.

Example:

"Form preview.pdf"

Response

Returns the rendered PDF as an attachment.