Reorder pages
reorder_pagesReorder PDF pages in a specified sequence and save the result as a new file, leaving the original unchanged. Use pdf_info to confirm page count before reordering.
Instructions
Puts the pages in a new order, named with -reordered. The order must list every page exactly once; use pdf_info for the page count. Writes the result as a new file next to the input (or to output_path) and never replaces an existing file; the input is left unchanged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to a PDF file, or one starting with ~/. | |
| order | Yes | Every page number once, in the new order, e.g. [3, 1, 2] | |
| output_path | No | Optional absolute path for the new PDF, ending in .pdf. It must not exist yet. By default the result goes next to the input. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | Yes | Pages in the new PDF | |
| output_path | Yes | Where the new PDF was written |