Rotate Pages from PDF
Purpose
This API allows you to rotate specific pages within a PDF to a specified degree.
HTTP Request URL
https://{zohoapis_domain}/pdfeditor/api/v1/pdf/pages/rotate
Body Parameters
Parameter | Data Type | Description |
Mandatory Parameters | ||
file
| File or String
| Upload the PDF file in which the pages need to be rotated using one of the following methods:
Note: The maximum file size allowed for the input PDF is 50 MB. It cannot be more than 150 pages. |
output_settings | { "name": "<new document name>" } | Specify the name for the modified PDF document. |
Optional Parameters | ||
input_options | { | page_ranges -> Specify the pages to be rotated. Accepts individual pages or ranges. Defaults to all pages if not provided.
|
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/rotate" \
--header "Authorization: Zoho-oauthtoken xxx.yyy.zzz" \
--form 'file=@"/Users/username/Documents/Sample.pdf"' \
--form 'output_settings=“{\”name\”:\”ModifiedFile.pdf\"}"' \
--form 'input_options=“{\”page_ranges\”:\”1-4,8,10\",\”direction\”:\”right\",\”degree\”:\”90\"}"'
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/rotate/job/f931a01183b33",
"status": "inprogress"
}
Success Response
Copied{
"download_url": "https://pdf.zoho.com/pdfeditor/api/v1/pdf/pages/rotate/download/f931a01183b33",
"status": "success"
}