---
title: "view.rotate: Rotate View — PDF kit command — Kition"
description: "Turns how the pages are shown by a multiple of 90 degrees, clockwise or back, without changing the file: no page is rotated, nothing becomes unsaved and there is no undo step. Answers the view's rotation now."
canonical: "https://developer.kition.ai/docs/kits/pdf/commands/view.rotate"
---

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

# view.rotate

**Rotate View.** Turns how the pages are shown by a multiple of 90 degrees, clockwise or back, without changing the file: no page is rotated, nothing becomes unsaved and there is no undo step. Answers the view's rotation now.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `degrees` | `integer` | no | How far to turn the view: a multiple of 90, clockwise; negative turns it counterclockwise (-90 is a quarter turn back). Defaults to 90. |

## Call through pdf_run

```text
pdf_run {
  "path": "<file>.pdf",
  "steps": [{ "command": "view.rotate" }]
}
```

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

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `rotation` | `integer` | no | The view's rotation now: 0, 90, 180 or 270 degrees clockwise. |

```json
{
  "additionalProperties": false,
  "properties": {
    "rotation": {
      "description": "The view's rotation now: 0, 90, 180 or 270 degrees clockwise.",
      "type": "integer"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "degrees": {
      "default": 90,
      "description": "How far to turn the view: a multiple of 90, clockwise; negative turns it counterclockwise (-90 is a quarter turn back). Defaults to 90.",
      "type": "integer"
    }
  },
  "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).
