Split a PDF
POST/pdf/split
Cuts a PDF into several: every pages each, or one PDF per entry of ranges, each a page
selection such as 1-3,5, or 4- for page 4 to the last. The answer is a render whose
output is a ZIP of the parts, named after the source (contract-1.pdf, contract-2.pdf, …),
or the PDF itself when the split yields one part. The source is a stored PDF named as
source in a JSON body, or an upload: multipart/form-data with the PDF as file, up to the
plan's output size and at most 100 MB, which is never stored. Costs 0.5 units on live keys;
Starter plan and above (403 forbidden, feature: post_processing, below). A PDF/A answers
422 source_invalid, because the parts would keep a claim nobody checked; a password-protected
PDF 422 source_encrypted. Needs render:create.
Request
Responses
- 200
- 413
- 415
- 422
- 429
- 503
- default
The render; its output is zip, or pdf for a single part.
The upload is larger than the plan's output size or 100 MB.
file_type_unsupported: the upload is no PDF.
source_not_found, source_invalid (unreadable, signed, or a PDF/A), source_encrypted, page_limit_exceeded, output_too_large, or invalid_request for a range past the last page.
rate_limited: the workspace's bucket of the plan's requests per second is empty (Free test keys also have 30 a minute). The problem names the bucket's limit and its window_seconds. Retry after Retry-After seconds.
Response Headers
Seconds until a request is let through again.
Size of the workspace's request bucket: the plan's requests per second. Free test keys are also held to 30 requests a minute, and the headers then describe whichever bucket is closer to empty.
Requests left in the bucket.
Seconds until the bucket is full again.
tool_unavailable: the PDF tools are busy; retry after Retry-After seconds.
Error (RFC 9457 problem details).