---
title: "Split PDF on iOS — PDF split SDK | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/ios/editor/split/"
md_url: "https://www.nutrient.io/guides/ios/editor/split.md"
last_updated: "2026-05-23T00:08:18.107Z"
description: "Nutrient’s Processor API enables you to split a PDF document into multiple documents."
---

# Split PDFs on iOS

Nutrient’s [`Processor`](https://www.nutrient.io/api/ios/documentation/pspdfkit/processor) API enables you to split a PDF document into multiple documents.

[`Processor`](https://www.nutrient.io/api/ios/documentation/pspdfkit/processor) can extract ranges of pages from one document and put them into another document. If you run this operation multiple times with different page indexes, you can effectively split a PDF into as many documents as you require.

In most cases, you’ll want to use [`Processor`](https://www.nutrient.io/api/ios/documentation/pspdfkit/processor) to create PDF documents on disk based on a current [`Document`](https://www.nutrient.io/api/ios/documentation/pspdfkit/document). This example code will split a single PDF document into two at the provided page index:

```swift

let document =...

// Split on the fifth page.
let splitIndex = 5
precondition(splitIndex > 0 && splitIndex < document.pageCount)

// Save the output in the app documents directory.
let documentsDirectory = FileManager.default.urls(for:.documentDirectory, in:.userDomainMask).first!
let splitPath = documentsDirectory.appendingPathComponent("Split")

let ranges = [IndexSet(integersIn: 0...splitIndex - 1),
              IndexSet(integersIn: splitIndex...Int(document.pageCount - 1))]

for (index, indexSet) in ranges.enumerated() {
    let configuration = Processor.Configuration(document: document)!
    // Specify the page range to keep after processing.
    configuration.includeOnlyIndexes(indexSet)

    let processor = Processor(configuration: configuration, securityOptions: nil)
    // Save to a new file on disk. Use a unique name.
    let output = URL(string: "\(splitPath)_\(index)_\(NSUUID().uuidString).pdf")!
    try processor.write(toFileURL: output)
}

```

Similar functionality is also available via the [Document Editor](https://www.nutrient.io/guides/ios/features/document-editor.md). See the [`PDFDocumentEditor.exportPages(_,to:, withCompletionBlock:)`](https://www.nutrient.io/api/ios/documentation/pspdfkit/pdfdocumenteditor/exportpages(_:topath:withcompletionblock:)) API documentation for more information.
---

## Related pages

- [Add pages to PDF files on iOS](/guides/ios/editor/add-page.md)
- [How to attach files to PDFs on iOS](/guides/ios/editor/attach-a-file.md)
- [Add and insert images into PDFs on iOS](/guides/ios/editor/add-image.md)
- [Edit text in PDFs on iOS](/guides/ios/editor/edit-text.md)
- [iOS PDF editor API usage](/guides/ios/features/document-editor.md)
- [Merge multiple PDF files on iOS](/guides/ios/editor/merge-or-combine.md)
- [Customizing PDF editing permissions on iOS](/guides/ios/editor/document-permissions.md)
- [PDF editor library for iOS](/guides/ios/features/document-processing.md)
- [Adding watermarks to PDFs on iOS](/guides/ios/editor/watermark.md)

