<!--
{
  "documentType" : "article",
  "framework" : "PDFKit",
  "identifier" : "/documentation/PDFKit/read-operations",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Read Operations"
}
-->

# Read Operations

Operations that let you access documents and pages, manage document security, and work with searching and selections.

## Topics

### Accessing Document Information

[`documentURL`](/documentation/PDFKit/PDFDocument/documentURL)

The URL for the document.

[`majorVersion`](/documentation/PDFKit/PDFDocument/majorVersion)

The major version of the document.

[`minorVersion`](/documentation/PDFKit/PDFDocument/minorVersion)

The minor version of the document.

[`string`](/documentation/PDFKit/PDFDocument/string)

A string representing the textual content for the entire document.

[`outlineItem(for:)`](/documentation/PDFKit/PDFDocument/outlineItem(for:))

Returns the most likely parent PDF outline object for the selection.

[`outlineRoot`](/documentation/PDFKit/PDFDocument/outlineRoot)

The document’s root outline to a PDF outline object.

[`documentAttributes`](/documentation/PDFKit/PDFDocument/documentAttributes)

A dictionary of document metadata.

[`documentRef`](/documentation/PDFKit/PDFDocument/documentRef)

The `CGPDFDocument` associated with the `PDFDocument` object.

### Managing Document Security

[`isEncrypted`](/documentation/PDFKit/PDFDocument/isEncrypted)

A Boolean value specifying whether the document is encrypted.

[`isLocked`](/documentation/PDFKit/PDFDocument/isLocked)

A Boolean value indicating whether the document is locked.

[`unlock(withPassword:)`](/documentation/PDFKit/PDFDocument/unlock(withPassword:))

Attempts to unlock an encrypted document.

[`permissionsStatus`](/documentation/PDFKit/PDFDocument/permissionsStatus)

The permissions status of the PDF document.

[Permission Properties](/documentation/PDFKit/permission-properties)

Properties that specify what functions are allowed for a PDF document.

### Working with Selections and Searches

[`selection(from:atCharacterIndex:to:atCharacterIndex:)`](/documentation/PDFKit/PDFDocument/selection(from:atCharacterIndex:to:atCharacterIndex:))

Returns the specified selection based on starting and ending character indexes.

[`selection(from:at:to:at:)`](/documentation/PDFKit/PDFDocument/selection(from:at:to:at:))

Returns the specified selection based on starting and ending points.

[`selectionForEntireDocument`](/documentation/PDFKit/PDFDocument/selectionForEntireDocument)

Returns a selection representing the textual content of the entire document.

[Search Operations](/documentation/PDFKit/search-operations)

Find and search in PDFs.

### Working with Pages

[`pageCount`](/documentation/PDFKit/PDFDocument/pageCount)

The number of pages in the document.

[`page(at:)`](/documentation/PDFKit/PDFDocument/page(at:))

Returns the page at the specified index number.

[`index(for:)`](/documentation/PDFKit/PDFDocument/index(for:))

Gets the index number for the specified page.

[`insert(_:at:)`](/documentation/PDFKit/PDFDocument/insert(_:at:))

Inserts a page at the specified index point.

[`removePage(at:)`](/documentation/PDFKit/PDFDocument/removePage(at:))

Removes the page at the specified index point.

[`exchangePage(at:withPageAt:)`](/documentation/PDFKit/PDFDocument/exchangePage(at:withPageAt:))

Swaps one page with another.

[`pageClass`](/documentation/PDFKit/PDFDocument/pageClass)

The class that is allocated and initialized when page objects are created for the document.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)