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

# string

A string representing the textual content for the entire document.

## Declaration

```swift
var string: String? { get }
```

## Return Value

Return Value A string that represents the textual content of the entire document.

## Discussion

Discussion Pages are delimited with linefeed characters. This is a convenience method, equivalent to creating a selection object for the entire document and then invoking the PDFSelection class’s string method.

## See Also

### Accessing Document Information

- [documentURL](pdfkit/pdfdocument/documenturl.md)
- [majorVersion](pdfkit/pdfdocument/majorversion.md)
- [minorVersion](pdfkit/pdfdocument/minorversion.md)
- [outlineItem(for:)](pdfkit/pdfdocument/outlineitem(for:).md)
- [outlineRoot](pdfkit/pdfdocument/outlineroot.md)
- [documentAttributes](pdfkit/pdfdocument/documentattributes.md)
- [documentRef](pdfkit/pdfdocument/documentref.md)
