Split a PDF into several files
pdf_splitSplit a PDF into multiple files by specifying page ranges (e.g., '1-3,5-'). Preserves the original file; each range becomes a separate PDF.
Instructions
Call this tool to write one new PDF per range. Ranges are 1-based and may be open-ended: "1-3,5,7-" gives pages 1-3, page 5, and 7 to the end. The input is never modified. Free tier: files up to 30 pages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The PDF to split | |
| ranges | Yes | Comma-separated 1-based page ranges, e.g. "1-3,5,7-". An open-ended range runs to the last page | |
| overwrite | No | Replace existing outputs. Default false: nothing is overwritten and nothing is written at all if any target exists | |
| out_path_pattern | Yes | Output path with a placeholder: {n} is the part number (1, 2, 3...), {range} is the range itself (e.g. 1-3), {name} is the input file name without .pdf. Example: ~/out/{name}-{range}.pdf |