add_form_fields_to_pdf
Add interactive form fields (TextBox or CheckBox) to a PDF, specifying position, size, pages, and initial value. Save the modified PDF to disk.
Instructions
Add an interactive form field (TextBox or CheckBox) to a PDF via PDF4me AddFormField (/api/v2/AddFormField). Provide the PDF path, field name, initial value, position (X/Y in PDF units), Size, pages spec, and formFieldType. Saves the resulting PDF to disk.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pdf_file_path": "<pdf_file_path>",
"field_name": "<field_name>",
"initial_value": "<initial_value>",
"position_x": "<position_x>",
"position_y": "<position_y>",
"size": "<size>",
"pages": "<pages>",
"form_field_type": "<form_field_type>"
},
"name": "add_form_fields_to_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | ||
| pages | Yes | ||
| field_name | Yes | ||
| output_dir | No | ||
| position_x | Yes | ||
| position_y | Yes | ||
| initial_value | Yes | ||
| pdf_file_path | Yes | ||
| form_field_type | Yes | ||
| output_file_name | No | ||
| request_doc_name | No |