Some test text!

Disabling annotation tools and other functionality

In this document
chevron_rightDisabling annotation tools
chevron_rightDisabling functionality

The long-press popup menu and AnnotationToolbar show a default set of annotation creation tools. Editing of existing annotations is enabled for all annotation types by default. Other actions that are not tied to annotation creation, like text selection, form filling, and link following, are enabled by default.

linkDisabling annotation tools

Annotation creation and editing can be disabled on the ToolManager based on the annotation type with the setPermissionsForExtendedAnnotType:canCreate:canEdit: method:

When disabling creation or editing of annotations, the PTExtendedAnnotType enum is used. This enum extends the basic PTAnnotType to further distinguish annotations based on their properties (line and arrow, polygon and cloudy, etc.). The extendedAnnotType property can be used to get the type of a PTAnnot.

linkDisabling functionality

Functionality that is not directly tied to annotations is called an "interaction tool". The current interaction tools include text selection, form filling, link following, and ink erasing. The tool types are available in the PTInteractionToolType enum.

Interaction tools can be disabled on the ToolManager based on the tool type or via convenience properties:

The code above disables link following for link annotations and text links detected by the PTPDFViewCtrl (the setUrlExtraction: method must be called on the PDFViewCtrl to enable text link detection).