Split PDF into ranges
split_pdfSplit one PDF into multiple documents by specifying page ranges; each range produces a separate PDF file or embedded resource.
Instructions
Split one PDF into several documents, one per ranges[] entry ({ start, end? }, 0-based inclusive; end defaults to start). Multi-output result: base64 mode returns one embedded resource per part; file mode writes indexed siblings ('out.pdf' → 'out-1.pdf', 'out-2.pdf', …). Same page-tree caveats as merge_pdfs (signatures/AcroForm/XMP dropped; boxes kept). Encrypted sources: password. Need ONE document from a page subset? Use extract_pages.
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). | |
| encrypt | No | Re-encrypt the output (Standard Security Handler; AES-128 default or AES-256; RC4 never emitted). Applied to every produced range. | |
| password | No | Password (user or owner) of an encrypted source. Never logged or echoed. | |
| pdfBase64 | Yes | Base64-encoded source PDF. Pass `password` for an encrypted source. | |
| outputMode | No | 'base64' (default) returns the PDF inline; 'file' writes it inside the PDFNATIVE_MCP_OUTPUT_DIR sandbox (SECURITY_VIOLATION when the sandbox is not configured). | 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 |