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

# Removing pages from a PDF on iOS

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

## Using the Processor API

To remove pages via the `Processor` API, load your document and then configure the page removal 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
}

// Remove the first page. This API can be used to remove multiple pages at the same time.
configuration.removePages(IndexSet(integer: 0))

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)
}

```

## Using Document Editor

Page removal 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 remove the current page of a displayed document:

```swift

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

    // Remove the currently visible page.
    editor.removePages(IndexSet(integer: IndexSet.Element(pageIndex)))

    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()
            }
        }
    }
}

```

## Using the built-in UI

Nutrient iOS SDK comes with a prebuilt user interface for document editing that includes an option to remove 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)
- [Move or copy PDF pages on iOS](/guides/ios/editor/page-manipulation/move-or-copy.md)
- [Rotating PDF pages on iOS](/guides/ios/editor/page-manipulation/rotate.md)
- [Scale or resize PDFs on iOS](/guides/ios/editor/page-manipulation/scale-or-resize.md)

