---
title: pageClass
framework: pdfkit
role: symbol
role_heading: Instance Property
path: pdfkit/pdfdocument/pageclass
---

# pageClass

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

## Declaration

```swift
var pageClass: AnyClass { get }
```

## Discussion

Discussion If you want to supply a custom page class, subclass PDFDocument and implement this method to return your custom class. Note that your custom class must be a subclass of PDFPage; otherwise, the behavior is undefined. The default implementation of pageClass returns [PDFPage class].

## See Also

### Working with Pages

- [pageCount](pdfkit/pdfdocument/pagecount.md)
- [page(at:)](pdfkit/pdfdocument/page(at:).md)
- [index(for:)](pdfkit/pdfdocument/index(for:).md)
- [insert(_:at:)](pdfkit/pdfdocument/insert(_:at:).md)
- [removePage(at:)](pdfkit/pdfdocument/removepage(at:).md)
- [exchangePage(at:withPageAt:)](pdfkit/pdfdocument/exchangepage(at:withpageat:).md)
