> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/uwp/page-manipulation/rotate.md).

# Rotating a PDF page in UWP

Learn how to rotate pages in a PDF document easily with the Page.GetRotation() and Page.SetRotation() methods. Rotate pages by 90 degrees for better viewing and printing. The Apryse uwp SDK streamline

To rotate a page in a PDF document.

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
PDFDoc doc = new PDFDoc(fileName);

// Rotate the first page 90 degrees clockwise.
Page page = doc.GetPage(1);
PageRotate originalRotation = page.GetRotation();
PageRotate rotation;
switch (originalRotation)
{
    case PageRotate.e_0: rotation = PageRotate.e_90; break;
    case PageRotate.e_90: rotation = PageRotate.e_180; break;
    case PageRotate.e_180: rotation = PageRotate.e_270; break;
    case PageRotate.e_270: rotation = PageRotate.e_0; break;
    default: rotation = PageRotate.e_0; break;
}
page.SetRotation(rotation);
```

{% endcode %}
{% endtab %}
{% endtabs %}

## About rotating pages

A page can be rotated clockwise, by 90 degrees, when displayed or printed. The `Page.GetRotation()` method returns the `Page.Rotate` enum specifying the current rotation. Similarly, `Page.SetRotation()` sets the current rotation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/uwp/page-manipulation/rotate.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
