Extract pages into one PDF
extract_pagesExtract specified pages from a PDF into a single new document, removing signatures and forms but preserving URI links.
Instructions
Extract an arbitrary subset of pages (0-based, in the order given) from a PDF into a SINGLE new document (pdfnative v1.4 page-tree API). The output is a fresh, self-contained PDF (signatures/AcroForm dropped; URI links kept unless dropAnnotations=true). Encrypted sources are rejected (ENCRYPTED_SOURCE). Use split_pdf instead when you need several output PDFs (one per range).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | Yes | 0-based page indices to keep, in output order. Duplicates and out-of-range indices are rejected. | |
| pdfBase64 | Yes | Base64-encoded source PDF. Must not be encrypted. | |
| outputMode | No | base64 | |
| outputPath | No | ||
| dropAnnotations | No | When true, drop ALL annotations. Default keeps self-contained URI link annotations. | |
| maxOutputSizeBytes | No | Maximum size, in bytes, of the produced PDF. Defaults to 268435456 (256 MiB). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| filePath | No | Absolute sandboxed file path (when mode='file'). | |
| sizeBytes | Yes |