<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 11.0.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PDFKit",
  "identifier" : "/documentation/PDFKit/PDFDocumentDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "PDFKit"
    ],
    "preciseIdentifier" : "c:objc(pl)PDFDocumentDelegate"
  },
  "title" : "PDFDocumentDelegate"
}
-->

# PDFDocumentDelegate

The delegate for the `PDFDocument` object.

```
protocol PDFDocumentDelegate : NSObjectProtocol
```

## Topics

### Managing Document Security

[`documentDidUnlock(_:)`](/documentation/PDFKit/PDFDocumentDelegate/documentDidUnlock(_:))

Called when the `PDFDocumentDidUnlockNotification` notification is posted.

### Getting Document Search Notifications

[`didMatchString(_:)`](/documentation/PDFKit/PDFDocumentDelegate/didMatchString(_:))

Called for every match found during a find operation.

[`documentDidBeginDocumentFind(_:)`](/documentation/PDFKit/PDFDocumentDelegate/documentDidBeginDocumentFind(_:))

Called when the `PDFDocumentDidBeginFindNotification` notification is posted.

[`documentDidBeginPageFind(_:)`](/documentation/PDFKit/PDFDocumentDelegate/documentDidBeginPageFind(_:))

Called when the `PDFDocumentDidBeginPageFindNotification` notification is posted.

[`documentDidEndDocumentFind(_:)`](/documentation/PDFKit/PDFDocumentDelegate/documentDidEndDocumentFind(_:))

Called when the `PDFDocumentDidEndFindNotification` notification is posted.

[`documentDidEndPageFind(_:)`](/documentation/PDFKit/PDFDocumentDelegate/documentDidEndPageFind(_:))

Called when the `PDFDocumentDidEndPageFindNotification` notification is posted.

[`documentDidFindMatch(_:)`](/documentation/PDFKit/PDFDocumentDelegate/documentDidFindMatch(_:))

Called when the `PDFDocumentDidFindMatchNotification` notification is posted.

### Wrapping Document Elements

[`classForPage()`](/documentation/PDFKit/PDFDocumentDelegate/classForPage())

Returns a `PDFPage` subclass for a page object.

[`class(forAnnotationClass:)`](/documentation/PDFKit/PDFDocumentDelegate/class(forAnnotationClass:))

Returns a `PDFAnnotation` subclass for a class.

[`class(forAnnotationType:)`](/documentation/PDFKit/PDFDocumentDelegate/class(forAnnotationType:))

Returns a `PDFAnnotation` subclass for an annotation type.



---

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)