Split PDF into ranges
split_pdfSplit a PDF into separate documents using page ranges. Each range becomes its own PDF file.
Instructions
Split one PDF into several documents — one per requested page range (pdfnative v1.4 page-tree API). Ranges are 0-based and inclusive; end defaults to start (a single page). Each output is a fresh, self-contained PDF (signatures/AcroForm dropped; URI links kept unless dropAnnotations=true). Encrypted sources are rejected (ENCRYPTED_SOURCE). In base64 mode every produced PDF is returned as its own embedded resource block; in file mode each is written to a 1-based indexed sibling of outputPath ('out.pdf' → 'out-1.pdf', 'out-2.pdf', …). Use extract_pages instead when you want a single PDF from an arbitrary page subset.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ranges | Yes | Page ranges to extract, one output PDF per range. 0-based, inclusive; `end` defaults to `start` (a single page). | |
| pdfBase64 | Yes | Base64-encoded source PDF. Must not be encrypted. | |
| outputMode | No | base64 | |
| outputPath | No | Base output path (file mode). Each PDF is written to an indexed sibling: 'out.pdf' → 'out-1.pdf', 'out-2.pdf', … | |
| dropAnnotations | No | When true, drop ALL annotations. Default keeps self-contained URI link annotations. | |
| maxOutputSizeBytes | No | Maximum size, in bytes, of each produced PDF. Defaults to 268435456 (256 MiB). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| count | Yes | ||
| parts | Yes | ||
| totalBytes | Yes |