Manage PDF form fields
manage_formsCreate, fill, read, or validate PDF form fields programmatically. Returns JSON results per operation.
Instructions
Create, fill, read or validate PDF form fields.
Returns JSON per operation: create→{status, fields_created}; fill→{status, fields_filled}; read→{path, fields, page_count}; validate→{valid, fields}. 'create'/'fill' write output_path (overwriting); 'read'/'validate' are read-only computations.
Honest limitations: 'fill' lays the values into a new overlay at computed positions rather than mapping them onto the original AcroForm widgets; 'read' returns the page's text runs (not declared AcroForm field objects); 'validate' currently enforces only a non-empty (required) rule per value. For page-structure edits use manipulate_pdf; to read prose use extract_text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | 'create' a new PDF with text fields; 'fill' values onto a copy of an existing PDF; 'read' the text content of a form; 'validate' supplied values. 'read' and 'validate' do not write a file. | |
| output_path | No | Destination .pdf path (overwritten if present). Required for 'create' and 'fill'; unused for 'read'/'validate'. | |
| input_path | No | Source PDF. Required for 'fill', 'read' and 'validate'; unused for 'create'. | |
| fields | No | Field definitions for 'create'. Each: {name, type:'text', x, y, width, height (points), default_value?}. | |
| values | No | Map of field name to value. Required for 'fill' and 'validate'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |