POST
/
api
/
v1
/
renderers
/
pdf
curl --request POST \
  --url https://vortexpdf.com/api/v1/renderers/pdf \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "emulate_media_type": "print",
  "evaluate_js": {
    "expression": "<string>"
  },
  "footer_template": "<string>",
  "header_template": "<string>",
  "include_backgrounds": true,
  "margin": {
    "bottom": 10,
    "left": 10,
    "right": 10,
    "top": 10,
    "unit": "mm"
  },
  "orientation": "portrait",
  "output_format": "pdf/a",
  "pages": "",
  "parts": [
    "https://example.com",
    "<h1>Hello World</h1>",
    {
      "content": "<div>Structured HTML content</div>",
      "type": "html"
    },
    {
      "content": {
        "context": {
          "customer_name": "Acme Inc."
        },
        "template_id": "invoice_template"
      },
      "type": "template"
    }
  ],
  "prefer_css_page_size": false,
  "render_header_footer": false,
  "scale": 1,
  "set_cookie": {
    "domain": "<string>",
    "name": "<string>",
    "value": "<string>"
  },
  "size": "a4",
  "wait_for": {
    "attribute": "<string>",
    "selector": "<string>"
  },
  "output_encoding": "binary"
}'
This response does not have an example.

Authorizations

Authorization
string
header
required

Manage your API keys at https://vortexpdf.com/api-keys

Body

application/json

Render options

Options for synchronous PDF rendering, where the PDF is returned directly in the API response. Common options for configuring PDF rendering behavior, applicable to both synchronous and asynchronous rendering.

Response

200
application/json

Render succeeded

Response from a synchronous render request, containing the generated PDF file. Binary PDF file