Rotate Page
Organize → Rotate Page
The Rotate Page API rotates specified pages in a PDF. You send the PDF (docContent Base64, docName), rotationType (NoRotation, Clockwise, CounterClockwise, UpsideDown), page (e.g. 1, 1,3,5, 2-4), and optionally async. The API returns the PDF with those pages rotated. Use the tester below to try it; more details are in the sections that follow.
Try the Rotate Page API
:::note Quick reference
Endpoint: POST /api/v2/RotatePage · Required: api-key, docContent, docName, rotationType, page
:::
:::info Try it live Use the form below to send your API key, PDF (Base64), rotation type, and page(s) to rotate. The response is the PDF with those pages rotated. No code required—fill the fields and click Send request. :::
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Rotate Page?
This endpoint rotates only the pages you specify in a PDF. You provide rotationType (NoRotation, Clockwise, CounterClockwise, UpsideDown) and page (single page, multiple pages, or range, e.g. 1, 1,3,5, 2-4). The API returns the PDF with those pages rotated. Use it when only some pages need rotation (e.g. mixed orientations).
Rotation types
- NoRotation – No rotation applied.
- Clockwise – Rotate 90° clockwise.
- CounterClockwise – Rotate 90° counter-clockwise.
- UpsideDown – Rotate 180°.
Page selection format
- Single page: e.g. 1
- Multiple pages: e.g. 1,3,5
- Page range: e.g. 2-4
:::tip Best for Use when only specific pages need rotation. For rotating all pages use Rotate Document. :::
API parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api-key | string | Yes | Your PDF4me API key, Base64 encoded. Get it from the dashboard. |
| docContent | base64 | Yes | PDF file content (Base64). |
| docName | string | Yes | Output PDF file name (e.g. output.pdf). |
| rotationType | string | Yes | NoRotation, Clockwise, CounterClockwise, or UpsideDown. |
| page | string | Yes | Page(s) to rotate: 1, 1,3,5, 2-4. |
| async | boolean | No | Enable asynchronous processing. |
When to use Rotate Page
- Mixed orientations – Rotate only the pages that are sideways or upside down.
- Selective correction – Fix orientation for specific pages (e.g. 1, 3, 5).
- Partial rotation – Rotate a range of pages (e.g. 2-4) without affecting the rest.
:::info Need the full API? For request/response schemas and code samples, see Rotate Page in the PDF4me API docs. :::
Prerequisites
Before using this endpoint, make sure you have:
- A valid PDF4me API key (Get your API Key)
- A PDF file in Base64 format
Response Format
The API returns a PDF file with the specified pages rotated.