Reorder PDF pages
reorder_pdf_pagesReorder pages in a PDF by listing the new sequence; omitted pages are dropped, and a trailing hyphen keeps the remaining pages. Saves a new file without changing the original.
Instructions
Save a new PDF with the pages in a new order. List every page in the order wanted; pages left out are dropped, so end with e.g. "4-" to keep the rest. Use this to move pages; to only remove pages use delete_pdf_pages. Returns the saved path and page count; the input is not changed.
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>",
"order": "<order>"
},
"name": "reorder_pdf_pages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to the file (absolute, or relative to the working directory). | |
| order | Yes | The new page order, e.g. "3, 1-2, 4-", 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. |