---
title: selectionsByLine()
framework: pdfkit
role: symbol
role_heading: Instance Method
path: pdfkit/pdfselection/selectionsbyline()
---

# selectionsByLine()

Returns an array of selections, one for each line of text covered by the receiver.

## Declaration

```swift
func selectionsByLine() -> [PDFSelection]
```

## Discussion

Discussion If you call this method on a PDFSelection object that represents a paragraph, for example, selectionsByLine returns an array that contains one PDFSelection object for each line of text in the paragraph.

## See Also

### Getting Information About a Selection

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