Delete PDF pages
delete_pdf_pagesRemove selected pages from a PDF and save a new file while preserving the order of all remaining pages. The original document stays unchanged.
Instructions
Save a new PDF without the listed pages; all other pages keep their order. Use this to drop pages; to keep only a few use extract_pdf_pages. Returns the saved path and remaining page count. The input is not changed, and deleting every page is refused.
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": {
"file": "<file>",
"pages": "<pages>"
},
"name": "delete_pdf_pages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to the file (absolute, or relative to the working directory). | |
| pages | Yes | Pages to delete, like "1-3, 8" (a trailing "-" means to the end). | |
| output | No | Where to save the result. Defaults to a new file next to the input. | |
| password | No | The PDF's current password, if it has one. |