This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/react-native/viewer/page-rotation.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Rotate pages in React Native PDF viewer | Nutrient SDK

You can rotate individual pages in the viewer by calling PDFDocument.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():

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:

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