Extract Pages
Organize → Extract Pages
The Extract Pages API creates a new PDF from selected pages of a source PDF. You send the PDF (docContent Base64, docName), pageNumbers (e.g. 1, 1,3,5, 2-4), and optionally async. The API returns a PDF containing only those pages. Use the tester below to try it; more details are in the sections that follow.
Try the Extract Pages API
:::note Quick reference
Endpoint: POST /api/v2/Extract · Required: api-key, docContent, docName, pageNumbers
:::
:::info Try it live Use the form below to send your API key, PDF (Base64), and page numbers or range to extract. The response is a PDF with only those pages. No code required—fill the fields and click Send request. :::
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Extract Pages?
This endpoint extracts selected pages from a PDF and returns a new PDF with only those pages. You provide pageNumbers: single page (e.g. 1), multiple pages (e.g. 1,3,5), or a range (e.g. 2-4). Use it to create shorter versions, booklets, or subsets from a larger PDF.
Page selection format
- Single page: e.g. 1
- Multiple pages: e.g. 1,3,5
- Page range: e.g. 2-4
:::tip Best for Use when you need a subset of pages from a PDF. For splitting into multiple PDFs use Split PDF; for removing pages use Delete Unwanted Pages. :::
API parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api-key | string | Yes | Your PDF4me API key, Base64 encoded. Get it from the dashboard. |
| docContent | base64 | Yes | PDF file content (Base64). |
| docName | string | Yes | Output PDF file name (e.g. output.pdf). |
| pageNumbers | string | Yes | Pages to extract: 1, 1,3,5, 2-4. |
| async | boolean | No | Enable asynchronous processing. |
When to use Extract Pages
- Shorter versions – Extract a subset of pages (e.g. summary, chapters).
- Digital booklets – Create a PDF with only selected pages.
- Subset creation – Pull specific pages from a large PDF for distribution.
:::info Need the full API? For request/response schemas and code samples, see Extract Pages in the PDF4me API docs. :::
Prerequisites
Before using this endpoint, make sure you have:
- A valid PDF4me API key (Get your API Key)
- A PDF file in Base64 format
Response Format
The API returns a PDF file containing only the specified pages.