Rotate 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

Rotates selected pages of a PDF by a given angle and direction, and makes the rotated PDF 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/rotate \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: multipart/form-data' \
  -F 'file=@file_path' \
  -F 'output_settings={
  "name": "quarterly-review-rotated.pdf"
}' \
  -F 'input_options={
  "page_ranges": [
    "2-4",
    "7,9"
  ],
  "direction": "right",
  "degree": "90"
}'

Request Body

multipart/form-data
filebinary(Required)

The source PDF whose pages are rotated, 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 255 characters. Password-protected PDFs are not supported. Supported formats: pdf.

Example
quarterly-review.pdf
output_settingsJSON Object(Required)

Configures the rotated PDF's filename.

Example
{
  "name": "quarterly-review-rotated.pdf"
}
Show Sub-Attributes
namestring(Required)

The filename for the rotated PDF. A .pdf extension is appended when the name does not already end with one.

Example
quarterly-review-rotated.pdf
Maximum Length :255255Copied!
input_optionsJSON Object(Optional)

Configures which pages are rotated and the direction and angle of rotation.

Example
{
  "page_ranges": [
    "2-4",
    "7,9"
  ],
  "direction": "right",
  "degree": "90"
}
Show Sub-Attributes
page_rangesarray[string](Optional)

Up to 10 expressions identifying the pages to rotate. If omitted or empty, every page in the source PDF is rotated.

Example
[
  "2-4",
  "7,9"
]
Maximum Length :100100Copied!
Range :[0 .. 10][0 .. 10]
directionstring(Optional)

The direction in which the selected pages are rotated.

Example
right
Allowed Values :
Show Values ▾
leftCopied!
rightCopied!
Copied!Copy all as JSON Array
Default Value :rightrightCopied!
Maximum Length :1010Copied!
degreestring(Optional)

The rotation angle, in degrees, applied to the selected pages.

Example
90
Allowed Values :
Show Values ▾
90Copied!
180Copied!
270Copied!
Copied!Copy all as JSON Array
Default Value :9090Copied!
Maximum Length :1010Copied!

Body Parameters

Copied!
// Note: payload contains multiple type attributes

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

// type: object
output_settings = {
  "name": "quarterly-review-rotated.pdf"
}

// type: object
input_options = {
  "page_ranges": [
    "2-4",
    "7,9"
  ],
  "direction": "right",
  "degree": "90"
}
▼ Show full

Response Example

200
Copied!
  {
    "status": "inprogress",
    "status_check_url": "https://www.zohoapis.com/pdfeditor/api/v1/pdf/pages/rotate/job/3f65c7592a741d98e46bf310cbe678f574a1d51fce306a8d9b6430217e538acd"
  }
                
▼ 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.