Split Pages from PDF
Purpose
Using this API, you will be able to split a PDF document.
HTTP Request URL
https://{zohoapis_domain}/pdfeditor/api/v1/pdf/pages/split
Body Parameters
Parameter | Data Type | Description |
Mandatory Parameters | ||
file
| File or String
| Upload the PDF file in which the pages need to be split using one of the following methods:
Note: Maximum file size limit for the input PDF is 50 MB. |
output_settings | { "name": "<new document name>" } | name -> Specify the name for the modified PDF document. |
input_options |
| Specify the number of pages each PDF document should contain. For example: If the input PDF document has 10 pages and you pass the 'split_by' key value as 2. It will get split into 5 different PDF documents with 2 pages in each document. |
Note: To use this API, an OAuth token should be generated with the following scopes; ZohoWriter.pdfEditor.ALL
Sample Request
Copiedcurl --location --request POST "https://www.zohoapis.com/pdfeditor/api/v1/pdf/pages/split" \
--header "Authorization: Zoho-oauthtoken xxx.yyy.zzz" \
--form 'files=@"/Users/username/Documents/Sample.pdf"' \
--form 'input_settings=“{\”split_by\”:\”2\"}"' \
--form 'output_settings=“{\”name\”:\”ModifiedFile.pdf\"}"'
Once the process begins, you will initially receive the 'status_url.' By invoking the 'status_url,' you will be able to monitor the status of the scheduled job.
Sample Response
Copied{
"status_check_url": "https://pdf.zoho.com/pdfeditor/api/v1/pdf/pages/split/job/f931a01183b33",
"status": inprogress
}
Success Response
Copied{
"download_url" :"https://pdf.zoho.com/pdfeditor/api/v1/pdf/pages/split/download/{jobId}",
"status": "success"
}