---
title: "iOS PDF rotate library — Rotate PDF pages on iOS | Nutrient"
canonical_url: "https://www.nutrient.io/guides/ios/editor/page-manipulation/rotate/"
md_url: "https://www.nutrient.io/guides/ios/editor/page-manipulation/rotate.md"
last_updated: "2026-06-08T09:14:14.401Z"
description: "Nutrient iOS SDK lets you rotate the pages of a document using the Processor or the Document Editor APIs."
---

# Rotating PDF pages on iOS

Nutrient iOS SDK lets you rotate the pages of a document using the Processor or the Document Editor APIs.

## Using the Processor API

To rotate pages via the `Processor` API, load your document and then configure the page rotation parameters on a `Processor.Configuration` instance. Processor is a great choice if you want to build an automated document processing operation:

```swift

let document =...

guard let configuration = Processor.Configuration(document: document) else {
    print("Could not create a processor configuration. The document might be locked or invalid.")
    return
}

// Rotate the first page 90 degrees clockwise.
configuration.rotatePage(0, by: 90)

let processor = Processor(configuration: configuration, securityOptions: nil)
do {
    // Write the modified document. This can be used to initialize
    // and present a new Nutrient document.
    try processor.write(toFileURL: destinationURL)
} catch {
    print(error)
}

```

Rotating pages with Processor is only available if you have the Document Editor component enabled in your license.

## Using Document Editor

Page rotation is also available as part of the Document Editor API. Document Editor is particularly useful if you want to build a general-purpose UI for manipulating pages, as it provides helpers that make building a document editing UI easy.

Here’s how you can use Document Editor to rotate the current page of a displayed document:

```swift

// Instance method on a `PDFViewController` subclass.
@objc private func rotatePage() {
    guard let document = document, let editor = PDFDocumentEditor(document: document) else {
        print("Document editing not available.")
        return
    }

    // Rotate the current page 90 degrees clockwise. This API can rotate multiple pages at the same time.
    editor.rotatePages([Int(pageIndex)], rotation: 90)

    editor.save { _, error in
        if let error = error {
            print("Error while saving: \(error)")
        } else {
            DispatchQueue.main.async {
                // Reload the document in the UI.
                self.reloadData()
            }
        }
    }
}

```

You can check out [RotatePageExample.swift](https://github.com/PSPDFKit/pspdfkit-ios-catalog/blob/master/Catalog/Examples/DocumentEditing/RotatePageExample.swift) in our [Catalog](https://github.com/PSPDFKit/pspdfkit-ios-catalog) project for a runnable example.

## Using the built-in UI

Nutrient iOS SDK comes with a prebuilt user interface for document editing that includes an option to rotate pages. To learn more, check out the [document editor UI](https://www.nutrient.io/guides/ios/features/document-editor-ui.md) overview.
---

## Related pages

- [Cropping PDF pages on iOS](/guides/ios/editor/page-manipulation/crop.md)
- [Removing pages from a PDF on iOS](/guides/ios/editor/page-manipulation/remove.md)
- [Move or copy PDF pages on iOS](/guides/ios/editor/page-manipulation/move-or-copy.md)
- [Scale or resize PDFs on iOS](/guides/ios/editor/page-manipulation/scale-or-resize.md)

