---
title: attributedString
framework: pdfkit
role: symbol
role_heading: Instance Property
path: pdfkit/pdfselection/attributedstring
---

# attributedString

Returns an NSAttributedString object representing the text contained in the selection (may contain linefeed characters).

## Declaration

```swift
var attributedString: NSAttributedString? { get }
```

## See Also

### Getting Information About a Selection

- [pages](pdfkit/pdfselection/pages.md)
- [string](pdfkit/pdfselection/string.md)
- [bounds(for:)](pdfkit/pdfselection/bounds(for:).md)
- [selectionsByLine()](pdfkit/pdfselection/selectionsbyline().md)
- [color](pdfkit/pdfselection/color.md)
