Edit pages (rotate / delete / reorder)
pagesDelete, rotate, and reorder pages in a PDF. Rotations target source page numbers; reordering uses positions after deletion.
Instructions
One-pass page editor. Delete pages, rotate specific pages by 90°/180°/270°, and reorder the result — in any combination. Page numbers in rotate refer to the SOURCE PDF; reorder refers to post-delete positions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the source PDF. | |
| delete | No | Pages to delete, 1-based, comma/range form. Example: "1,3,5-7". Applied BEFORE rotate and reorder. | |
| rotate | No | Per-page absolute rotations applied to pages that survive the delete step. Page numbers refer to the SOURCE PDF, not the post-delete one — easier to reason about. | |
| reorder | No | New page order, expressed as 1-based positions in the post-delete output. Example: [3,1,2] puts page 3 first. Must be a permutation of all surviving pages. | |
| outputPath | Yes | Absolute path to write the result to. |