Free plan

Extract Pages

Take chosen pages out of a PDF into a new, smaller PDF
POST
/v1/pdfs/extract

About this tool

This tool copies the pages you choose out of a PDF. Type the pages as numbers and ranges, such as 1,3-5. You can get one PDF with all those pages, one PDF for every page, or one PDF for every range. Your original PDF stays as it is.
For example, you keep only pages 3 to 5 of a long document.

How to use it

  1. Choose this tool.
  2. Add your PDF with Upload or drag and drop.
  3. Type the pages you want, such as 1,3-5.
  4. Choose whether you want one PDF or a separate PDF for each page or range.
  5. Press Generate, then download the result.

What you get back

You get one new PDF, or several, with only the pages you chose. Download them one by one or as a ZIP.
GOOD TO KNOW
Billed per output file. PDF page limits are plan-specific.
TEST IT LIVE

Try Extract Pages in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
PDFs
Plan
Free
Method
POST
Endpoint
/v1/pdfs/extract
Tool ID
pdfs.extract
Authentication
API key
Accepts
PDF
Background jobs
Yes
Usage group
Pdf
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/pdfs/extract" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'output=single' \
  -F 'output_bundle=zip' \
  -F 'response=url'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.pdfs.extract({
    "file": 'document.pdf',
    "output": "single",
    "output_bundle": "zip",
    "response": "url"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->pdfs()->extract([
    'file' => 'document.pdf',
    'output' => 'single',
    'output_bundle' => 'zip',
    'response' => 'url',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Take chosen pages out of a PDF into a new, smaller PDF.

Extract Pages accepts PDF. You can send several files in one request.

Extract Pages is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/pdfs/extract with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.