List the form fields
Lists a form's fields, with the values each takes, in the shape set-form fills.
POST/forms/pdf/form
Form data
Response
JSON, one entry per PDF under its file name.
The route answers directly: it ignores Gotenberg-Output-Filename, and answers 400 to the webhook headers. An error answers a status and a message: see Errors.
List the fields
curl \
--request POST http://localhost:3000/forms/pdf/form \
--form files=@fields.pdf
Response
{
"fields.pdf": [
{
"name": "agree",
"type": "checkbox",
"value": "Off",
"pages": [
1
],
"states": [
"Yes"
]
},
{
"name": "color",
"type": "combo",
"value": "Red",
"pages": [
1
],
"options": [
"Red",
"Green"
]
}
]
}
Each field comes with its fully qualified name, its type (text, checkbox, radio, button, combo, list or signature), its value, and the pages it sits on:
stateslists what a checkbox or a radio group takes besidesOff.optionslists what a choice field takes.- A list that selects several has an array
value. readOnly,required,multiSelect,editableandmaxLengthshow when they apply.
A PDF without a form answers []. set-form takes the names and the values as listed.
List the fields of some pages
pages keeps the fields on those pages, as a page selection:
curl \
--request POST http://localhost:3000/forms/pdf/form \
--form files=@multi.pdf \
--form pages=2
Response
{
"multi.pdf": [
{
"name": "total",
"type": "text",
"value": "42",
"pages": [
1,
2
],
"readOnly": true
},
{
"name": "size",
"type": "radio",
"value": "Off",
"pages": [
2
],
"states": [
"S",
"M",
"L"
],
"required": true
},
{
"name": "sig",
"type": "signature",
"value": "",
"pages": [
2
]
}
]
}