---
title: "page.rotate: Rotate pages — PDF kit command — Kition"
description: "Rotate pages by a multiple of 90 degrees (positive is clockwise): the listed pages (default all), filtered by subset (all, even, odd page numbers) and orientation (all, landscape, portrait). Undoable."
canonical: "https://developer.kition.ai/docs/kits/pdf/commands/page.rotate"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/pdf/commands/page.rotate](https://developer.kition.ai/docs/kits/pdf/commands/page.rotate)

# page.rotate

**Rotate pages.** Rotate pages by a multiple of 90 degrees (positive is clockwise): the listed pages (default all), filtered by subset (all, even, odd page numbers) and orientation (all, landscape, portrait). Undoable.

- Kit: PDF 0.1.0 (.pdf); reference: [PDF kit commands](https://developer.kition.ai/docs/kits/pdf.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `degrees` | `integer` | yes |  |
| `orientation` | `"all" \| "landscape" \| "portrait"` | no |  |
| `pages` | `integer[]` | no | 1-based page numbers to rotate (default: all). (minItems 1) |
| `subset` | `"all" \| "even" \| "odd"` | no |  |

## Call through pdf_run

```text
pdf_run {
  "path": "<file>.pdf",
  "steps": [{ "command": "page.rotate", "params": { "degrees": <integer> } }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `orientation`, `pages`, `subset`. pdf_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "degrees": {
      "type": "integer"
    },
    "orientation": {
      "enum": [
        "all",
        "landscape",
        "portrait"
      ],
      "type": "string"
    },
    "pages": {
      "description": "1-based page numbers to rotate (default: all). (minItems 1)",
      "items": {
        "description": "(minimum 1)",
        "type": "integer"
      },
      "type": "array"
    },
    "subset": {
      "enum": [
        "all",
        "even",
        "odd"
      ],
      "type": "string"
    }
  },
  "required": [
    "degrees"
  ],
  "type": "object"
}
```

Generated from the command list of @kition/pdf-darwin-arm64@0.1.0 and the kit itself (pdf_commands through @kition/cli@0.1.1, built from KitionAI/kition-pdf@b0d2725).
