# Rotating pages in our React Native PDF viewer

You can rotate individual pages in the viewer by calling [`PDFDocument.setRotationOffset`](https://www.nutrient.io/api/react-native/PDFDocument.html#.setRotationOffset). This sets a display-only rotation for the specified page — it’s applied in the viewer, but it isn’t written back to the PDF.

## Setting a page’s rotation

Call `setRotationOffset(pageIndex, rotation)` on the document instance returned by `getDocument()`:

```js

await this.pdfRef.current?.getDocument().setRotationOffset(0, 90);

```

- **`pageIndex`**: Zero-based page index of the page to rotate.

- **`rotation`**: Rotation in degrees. Must be `0`, `90`, `180`, or `270`.

## Resetting a page’s rotation

To reset a rotated page back to its original orientation, set its rotation offset to `0`:

```js

await this.pdfRef.current?.getDocument().setRotationOffset(0, 0);

```
---

## Related pages

- [React Native PDF viewer library](/guides/react-native/viewer.md)
- [React Native image viewer library](/guides/react-native/viewer/images.md)
- [Customizing page navigation in our React Native PDF viewer](/guides/react-native/viewer/page-navigation.md)
- [Configuring scroll direction and page transitions in our React Native viewer](/guides/react-native/viewer/page-transition.md)
- [React Native PDF reader library](/guides/react-native/viewer/reader-view.md)

