Fill a PDF form
fill_pdf_formFills the fields of a PDF form by their full names, as get_pdf_info lists them, and returns the render with download_url and form: how many fields were filled, which were left out, and which hold a calculation or display format that no viewer ran. The form stays fillable, or flatten draws the values into the pages. A name the form lacks or a value its field does not take fails the call with form_field_unknown or form_value_invalid, naming the field, unless strict is false. Pass exactly one PDF: source, a render or library file of the workspace, or file_base64, the PDF itself. Starter plan and above; 0.5 units on a live key. The values are never stored; a signed form and an XFA form are refused.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "fill_pdf_form"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Values by the fields' full names: text for a text field, true or false for a check box, one of the field's options for a dropdown, a radio group or a check box with several on-values, a list of options for a list box | |
| source | No | A PDF of the workspace: the rnd_ id of a PDF render, or a PDF of the file library by name (such as terms.pdf) or fil_ id | |
| strict | No | true (the default) fails on a name the form lacks or a value its field does not take; false leaves both out and lists them in form.skipped | |
| flatten | No | Draw the values into the pages and remove the fields, so the values can no longer be changed | |
| filename | No | Name of the file behind download_url; the source's name when left out | |
| file_name | No | Name of the PDF given as file_base64 or path, e.g. contract.pdf; the results are named after it | |
| file_base64 | No | The PDF itself, base64 encoded, up to 20 MB; sent with the request and not kept |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | rnd_ id of the render | |
| form | No | What fill_pdf_form did: the fields filled, those left out (unknown name or invalid value) and those whose calculation or display format no viewer ran | |
| pdfa | No | The PDF/A verdict (PDF/A-2b or PDF/A-3b), when the template declares it | |
| error | Yes | Why a failed render failed | |
| units | Yes | Units the render counted | |
| output | No | The format of the file: pdf, png, jpg, webp, docx or pptx, or zip for the several files of split_pdf and pdf_to_image | |
| status | Yes | ||
| einvoice | No | The e-invoice report, when the render made one | |
| template | Yes | The template and version rendered; null for html and conversions | |
| expires_at | Yes | When download_url stops working; get_render issues a fresh one | |
| page_count | Yes | ||
| environment | Yes | ||
| download_url | Yes | Signed link to the file; null until the render succeeded | |
| accessibility | No | The PDF/UA-1 verdict, when the template declares it |