flatten_pdf
Flatten PDF form fields and annotations into page content so documents render consistently and edits are prevented.
Instructions
Flatten form fields and annotations into page content (requires the qpdf CLI). Needs the owner password if the PDF forbids changing comments or changing it. Signed PDFs are refused.
Any password argument can be "ask": the user then types it on a local page, so it never passes through the chat.
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": {
"input_path": "<input_path>"
},
"name": "flatten_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| password | No | ||
| overwrite | No | ||
| input_path | Yes | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | Yes | ||
| output | Yes | ||
| warnings | Yes | ||
| password_protected | Yes | ||
| user_password_changed | Yes | ||
| permissions_restricted | Yes |