Split a PDF into multiple parts
POST/api/v1/tools/split
Split a PDF into multiple parts, either by explicit page ranges
(e.g. "1-3", "4-4", "5-") or by splitting every N pages.
The result is returned as a ZIP archive containing multiple PDFs.
Exactly one of ranges or splitRule must be provided. If both are
present in the same request, the tools service will return a
400 Bad Request with the error message
"Provide either ranges or splitRule, not both".
When using ranges, each range string is validated using the same
rules as the pages tool. The request will be rejected with a
400 Bad Request if a range is syntactically invalid, has a
descending end (e.g. "5-2"), or contains a page number outside the
valid range of the document (e.g.
"Page 10 is out of bounds for document with 8 pages").
The referenced input must be a PDF. DOCX and other file types are rejected with a 400 error.
File lifecycle: The input file in the input bucket is deleted
after a successful operation.
Request
Responses
- 200
- 400
- 401
- 402
- 500
ZIP file with split PDFs returned as binary response
Bad request
Unauthorized
Insufficient tokens
Internal server error