---
title: PDFDocumentDelegate
framework: pdfkit
role: symbol
role_heading: Protocol
path: pdfkit/pdfdocumentdelegate
---

# PDFDocumentDelegate

The delegate for the PDFDocument object.

## Declaration

```swift
protocol PDFDocumentDelegate : NSObjectProtocol
```

## Mentioned in

Adding Custom Graphics to a PDF

## Topics

### Managing Document Security

- [documentDidUnlock(_:)](pdfkit/pdfdocumentdelegate/documentdidunlock(_:).md)

### Getting Document Search Notifications

- [didMatchString(_:)](pdfkit/pdfdocumentdelegate/didmatchstring(_:).md)
- [documentDidBeginDocumentFind(_:)](pdfkit/pdfdocumentdelegate/documentdidbegindocumentfind(_:).md)
- [documentDidBeginPageFind(_:)](pdfkit/pdfdocumentdelegate/documentdidbeginpagefind(_:).md)
- [documentDidEndDocumentFind(_:)](pdfkit/pdfdocumentdelegate/documentdidenddocumentfind(_:).md)
- [documentDidEndPageFind(_:)](pdfkit/pdfdocumentdelegate/documentdidendpagefind(_:).md)
- [documentDidFindMatch(_:)](pdfkit/pdfdocumentdelegate/documentdidfindmatch(_:).md)

### Wrapping Document Elements

- [classForPage()](pdfkit/pdfdocumentdelegate/classforpage().md)
- [class(forAnnotationClass:)](pdfkit/pdfdocumentdelegate/class(forannotationclass:).md)
- [class(forAnnotationType:)](pdfkit/pdfdocumentdelegate/class(forannotationtype:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Setting the Delegate

- [delegate](pdfkit/pdfdocument/delegate.md)
