# Document Rotation

The PdfViewer provides options for rotating the pages of the loaded document through the buttons in the [toolbar](https://www.telerik.com/winui/documentation/controls/radpdfviewer/toolbar).

![WinUI RadPdfViewer ](https://www.telerik.com/winui/documentation/assets/be221966acc8d62e715bc74f3cbbefae/radpdfviewer-rotation-0.png)

To rotate the document in code, use the `SetRotationAngle` method of `RadPdfViewer` or the commands of `RotateClockwiseCommandDescriptor` and `RotateCounterClockwiseCommandDescriptor`.

#### **Rotate the document by using the SetRotationAngle method**

```C#
this.pdfViewer.SetRotationAngle(RotationAngle.Degrees180);      
```

#### **Rotate the document by using the command descriptor**

```C#
this.pdfViewer.CommandDescriptors.RotateClockwiseCommandDescriptor.Command.Execute(null);
```

The current rotation angle can be accessed with the `RotationAngle` property of the `RadPdfViewer`.

#### **Get the rotating angle**

```C#
RotationAngle angle = this.pdfViewer.RotationAngle;
```

## See Also

* [Commands Support](https://www.telerik.com/winui/documentation/controls/radpdfviewer/command-descriptors)
* [Zooming](https://www.telerik.com/winui/documentation/controls/radpdfviewer/user-interaction/zooming)
* [Scrolling](https://www.telerik.com/winui/documentation/controls/radpdfviewer/user-interaction/scrolling)
