Instance Method

bounds(for:)

Returns the bounds of the selection on the specified page.

Declaration

iOS, Mac Catalyst
func bounds(for page: PDFPage) -> CGRect
macOS
func bounds(for page: PDFPage) -> NSRect

Discussion

The selection rectangle is given in page space.

Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.

See Also

Getting Information About a Selection

var pages: [PDFPage]

Returns the array of pages contained in the selection.

var string: String?

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

var attributedString: NSAttributedString?

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

func selectionsByLine() -> [PDFSelection]

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

var color: UIColor?

Sets the color used for the drawing of a selection in both active and inactive states.