<!--
{
  "documentType" : "article",
  "framework" : "PDFKit",
  "identifier" : "/documentation/PDFKit/document-interactions",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Document Interactions"
}
-->

# Document Interactions

Handle selections, work with annotation actions, convert page and view points, and work with mouse events in a document.

## Topics

### Handling Selections

[`currentSelection`](/documentation/PDFKit/PDFView/currentSelection)

The current selection.

[`setCurrentSelection(_:animate:)`](/documentation/PDFKit/PDFView/setCurrentSelection(_:animate:))

Sets the current selection, in an animated way, if desired.

[`selectAll(_:)`](/documentation/PDFKit/PDFView/selectAll(_:))

Selects all text in the document.

[`clearSelection()`](/documentation/PDFKit/PDFView/clearSelection())

Clears the selection.

[`copy(_:)`](/documentation/PDFKit/PDFView/copy(_:))

Copies the text in the selection, if any, to the Pasteboard.

[`scrollSelectionToVisible(_:)`](/documentation/PDFKit/PDFView/scrollSelectionToVisible(_:))

Scrolls the view until the selection is visible.

[`highlightedSelections`](/documentation/PDFKit/PDFView/highlightedSelections)

Returns the array of selections that are highlighted using `setHighlightedSelections`.

### Working with Annotation Actions

[`annotationsChanged(on:)`](/documentation/PDFKit/PDFView/annotationsChanged(on:))

Tells the PDF view that an annotation on the specified page has changed.

[Link Annotations](/documentation/PDFKit/link-annotations)

Validate and handle links in a PDF view.

### Converting Page and View Points

[`page(for:nearest:)`](/documentation/PDFKit/PDFView/page(for:nearest:))

Returns the page containing a point specified in view coordinates.

[`convert(_:to:)`](/documentation/PDFKit/PDFView/convert(_:to:)-9twqk)

Converts a point from view space to page space.

[`convert(_:to:)`](/documentation/PDFKit/PDFView/convert(_:to:)-8cp0c)

Converts a rectangle from view space to page space.

[`convert(_:from:)`](/documentation/PDFKit/PDFView/convert(_:from:)-4evlx)

Converts a point from page space to view space.

[`convert(_:from:)`](/documentation/PDFKit/PDFView/convert(_:from:)-9xv1z)

Converts a rectangle from page space to view space.

### Working with Mouse Position and Events

[`areaOfInterest(forMouse:)`](/documentation/PDFKit/PDFView/areaOfInterest(forMouse:))

Returns the type of area the mouse cursor is over.

[`areaOfInterest(for:)`](/documentation/PDFKit/PDFView/areaOfInterest(for:))

Returns the type of area for a specific cursor location point.

[`PDFAreaOfInterest`](/documentation/PDFKit/PDFAreaOfInterest)

The mouse position over PDF view areas.

[`setCursorFor(_:)`](/documentation/PDFKit/PDFView/setCursorFor(_:))

Sets the type of mouse cursor according to the type of area the mouse cursor is over.

[`perform(_:)`](/documentation/PDFKit/PDFView/perform(_:))

Performs the specified action.

[Drag Operations](/documentation/PDFKit/drag-operations)

Define drag operations allowed for a view.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)