selection(from:at:to:at:)
Returns the specified selection based on starting and ending points.
Declaration
func selection(from startPage: PDFPage, at startPoint: CGPoint, to endPage: PDFPage, at endPoint: CGPoint) -> PDFSelection?func selection(from startPage: PDFPage, at startPoint: NSPoint, to endPage: PDFPage, at endPoint: NSPoint) -> PDFSelection?Discussion
The selection begins at startPt on startPage and ends at endPt on endPage. The starting and ending points should be specified in page space, relative to their respective pages.
The starting and ending points can be on the same page. In this case, invoking this method is equivalent to sending the selectionFromPoint:toPoint: message to a PDFPage object.
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.