Skip to content

Render a template to PDF

POST
/render/template
curl --request POST \
--url http://localhost:8080/render/template \
--header 'Content-Type: application/json' \
--data '{ "data": { "additionalProperty": { "size": 1 } }, "options": { "baseUrl": "example", "title": "example" }, "template": { "attachments": [ { "content": "example", "description": "example", "mimeType": "example", "name": "example", "relationship": "example" } ], "config": { "page": { "background": { "src": "example", "type": "AUTO" }, "footer": { "repeat": true, "rows": [ { "blocks": [ { "config": { "align": "LEFT", "lineColor": "example", "spacing": { "bottom": 1, "left": 1, "right": 1, "top": 1 }, "style": "SOLID", "thickness": 1, "typography": { "align": "LEFT", "color": "example", "family": "example", "size": 1, "weight": "LIGHT" }, "width": "example" }, "id": "example" } ] } ] }, "locale": "example", "margins": { "bottom": 1, "left": 1, "right": 1, "top": 1 }, "pageNumbers": { "enabled": true, "position": "LEFT" }, "size": { "height": 1, "width": 1 } }, "typography": { "align": "LEFT", "color": "example", "family": "example", "size": 1, "weight": "LIGHT" } }, "fonts": { "additionalProperty": { "src": "example", "style": "example", "weight": "example" } }, "rows": [ { "blocks": [ { "config": { "align": "LEFT", "lineColor": "example", "spacing": { "bottom": 1, "left": 1, "right": 1, "top": 1 }, "style": "SOLID", "thickness": 1, "typography": { "align": "LEFT", "color": "example", "family": "example", "size": 1, "weight": "LIGHT" }, "width": "example" }, "id": "example" } ] } ], "version": 1 } }'

Renders a JSON template (with optional per-block data overrides) to a PDF/A-3a document.

Media type application/json
object
data

Per-block content overrides, keyed by block id. Object for most blocks; array of row objects for tables.

object
key
additional properties
One of: discriminator: type
object
size
integer
options
object
baseUrl
string
title
string
template
required
object
attachments
Array<object>
object
content
required
string
description
string
mimeType
string
name
required
string
relationship
string
config
object
page
object
background
object
src
required
string
type
string
Allowed values: AUTO IMAGE PDF
footer
object
repeat
boolean
rows
Array<object>
object
blocks
required
Array<object>
One of: discriminator: type
object
config
required
object
align
string
Allowed values: LEFT CENTER RIGHT
lineColor
string
spacing
object
bottom
integer
left
integer
right
integer
top
integer
style
string
Allowed values: SOLID DASHED DOTTED DOUBLE NONE
thickness
integer
typography
object
align
string
Allowed values: LEFT CENTER RIGHT
color
string
family
string
size
integer
weight
string
Allowed values: LIGHT REGULAR MEDIUM SEMI_BOLD BOLD
width
string
id
string
locale
string
margins
object
bottom
integer
left
integer
right
integer
top
integer
pageNumbers
object
enabled
boolean
position
string
Allowed values: LEFT CENTER RIGHT
size
One of: discriminator: type
object
height
required
integer
width
required
integer
typography
object
align
string
Allowed values: LEFT CENTER RIGHT
color
string
family
string
size
integer
weight
string
Allowed values: LIGHT REGULAR MEDIUM SEMI_BOLD BOLD
fonts
object
key
additional properties
object
src
required
string
style
string
weight

One or more whitespace-separated [FontWeight] values, e.g. “400” or “400 700”.

string
rows
Array<object>
object
blocks
required
Array<object>
One of: discriminator: type
object
config
required
object
align
string
Allowed values: LEFT CENTER RIGHT
lineColor
string
spacing
object
bottom
integer
left
integer
right
integer
top
integer
style
string
Allowed values: SOLID DASHED DOTTED DOUBLE NONE
thickness
integer
typography
object
align
string
Allowed values: LEFT CENTER RIGHT
color
string
family
string
size
integer
weight
string
Allowed values: LIGHT REGULAR MEDIUM SEMI_BOLD BOLD
width
string
id
string
version
required
integer

PDF document

Media type application/pdf
string format: binary

Invalid template, data, or request

Media type application/json
object
error
string
issues
required
Array<object>
object
code
required
string
message
required
string
path
required
string
Example generated
{
"error": "example",
"issues": [
{
"code": "example",
"message": "example",
"path": "example"
}
]
}

Rendering failed