Selecting Text in Our iOS Viewer

Text selection is controlled via TextSelectionView, which is part of every PDFPageView, and it can be accessed using the selectionView property.

PDFViewControllerDelegate has delegates that allow you to selectively block text selection (pdfViewController(_:shouldSelectText:with:at:on:)) and to be notified whenever a text has been selected (pdfViewController(_:didSelectText:with:at:on:)).

Text selection can also be disabled via the isTextSelectionEnabled switch in the configuration object.

Text can be programmatically selected via setting selectedGlyphs or selectedImage for image selection. Set these properties to nil to clear the current selection.