Extract PDF Pages

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Extracts selected pages from a PDF as a combined PDF, separate PDFs, or page images and makes the result available for download.

Endpoint

OAuth Scope

ZohoWriter.pdfEditor.ALLCopied!

Request Example

cURL
cURL
Java
Python
Deluge
Copied!
curl --request POST \
  --url https://www.zohoapis.com/pdfeditor/api/v1/pdf/pages/extract \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: multipart/form-data' \
  -F 'file=@file_path' \
  -F 'input_options={
  "page_ranges": [
    "1,2,5"
  ],
  "format": "pdf"
}' \
  -F 'output_settings={
  "name": "quarterly-review-extract",
  "single_pdf": true
}'

Request Body

multipart/form-data
filebinary(Required)

The source PDF from which to extract pages, uploaded directly or imported from a publicly accessible URL. The file must be no larger than 50 MB, contain no more than 400 pages, and have no page larger than 2,400 square inches. Its filename must not exceed 500 characters. Supported formats: pdf.

Example
quarterly-review.pdf
input_optionsJSON Object(Required)

Configures which pages to extract and the generated file format.

Example
{
  "page_ranges": [
    "1,2,5"
  ],
  "format": "pdf"
}
Show Sub-Attributes
page_rangesarray[string](Required)

One to 10 expressions identifying the pages to extract. Examples: ["1,2,5"], ["2-4,7-9"], ["-5"], and ["7-"]. A single expression can also be all, first, last, odd, or even.

Example
[
  "1,2,5"
]
Maximum Length :100100Copied!
Range :[1 .. 10][1 .. 10]
formatstring(Required)

The format of the extracted pages. jpeg and png render each selected page as an image at 300 DPI.

Example
pdf
Allowed Values :
Show Values ▾
jpegCopied!
pngCopied!
pdfCopied!
Copied!Copy all as JSON Array
Maximum Length :1010Copied!
output_settingsJSON Object(Required)

Configures the generated filenames and PDF packaging behavior.

Example
{
  "name": "quarterly-review-extract",
  "single_pdf": true
}
Show Sub-Attributes
namestring(Required)

The base name used for the generated files and downloadable result.

Example
quarterly-review-extract
Maximum Length :255255Copied!
single_pdfboolean(Optional)

Indicates whether all selected pages are combined into one PDF. When false, each selected page is generated as a separate PDF and the files are packaged in a ZIP archive. Applicable when input_options.format is pdf.

Example
true
Default Value :truetrueCopied!

Body Parameters

Copied!
// Note: payload contains multiple type attributes

// type: file
file = quarterly-review.pdf

// type: object
input_options = {
  "page_ranges": [
    "1,2,5"
  ],
  "format": "pdf"
}

// type: object
output_settings = {
  "name": "quarterly-review-extract",
  "single_pdf": true
}
▼ Show full

Response Example

200
Copied!
  {
    "status": "inprogress",
    "status_check_url": "https://www.zohoapis.com/pdfeditor/api/v1/pdf/pages/extract/job/9f871d4a6be73c1927f84bd05e3a9c618be75a40f297cc4e867ac09138d4f926"
  }
                
▼ Show full

Rate Limits

Duration1 minute
Threshold50
Lock Period5 minutes 30 seconds
Duration1 hour
Threshold200
Lock Period15 minutes
Duration1 day
Threshold2000
Lock Period2 hours

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.