pdf_fill
Fill AcroForm fields in a PDF and save the result. Provide field names and values to populate text, checkbox, and dropdown fields, with advice for encrypted PDFs.
Instructions
Fill AcroForm form fields in a PDF and save the result. Field names must exist in the PDF (use pdf_inspect first). All values are strings; checkboxes take "true"/"false"; dropdown/radio/optionlist values must be one of the field's options; text values must respect the field's maxLength from pdf_inspect. Encrypted PDFs are rejected with decrypt advice (common for government blanks with an empty user password).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | Yes | Field name → string value (from pdf_inspect's fillTemplate) | |
| flatten | No | Bake values into page content and drop the AcroForm so fields are no longer editable | |
| pdf_path | Yes | Absolute path to the template PDF | |
| output_path | Yes | Absolute path to write the filled PDF |