selection(for:)
Returns the text contained within the specified range.
Declaration
func selection(for range: NSRange) -> PDFSelection?Discussion
This method raises an exception if the range length is 0 or if either end of the range is outside the range of characters on the page.