PTToolManager
@interface PTToolManager : UIView <PTOverridable, PTPDFViewCtrlToolDelegate,
PTToolEvents, PTToolOptionsDelegate>
The PTToolManager
class is responsbile for forwarding events from the PDFViewCtrl to Tools,
and coordinating the control and data flow between tools.
-
An object that conforms to the
PTToolManagerDelegate
protocol.Declaration
Objective-C
@property (nonatomic, weak, nullable) id<PTToolManagerDelegate> delegate;
Swift
weak var delegate: (any PTToolManagerDelegate)? { get set }
-
The
PTPDFViewCtrl
that thePTToolManager
was initialized with.Declaration
Objective-C
@property (nonatomic, weak, readonly) PTPDFViewCtrl *_Nullable pdfViewCtrl;
Swift
weak var pdfViewCtrl: PTPDFViewCtrl? { get }
-
The view controller that the tool manager is associated with. Determined by the tool manager’s delegate’s implementation of
viewControllerForToolManager:
,Declaration
Objective-C
@property (nonatomic, weak, readonly) UIViewController *_Nullable viewController;
Swift
weak var viewController: UIViewController? { get }
-
Returns a newly initialized tool manager with the required pointer to the PTPDFViewCtrl on which it will operate.
Declaration
Objective-C
- (nonnull instancetype)initWithPDFViewCtrl: (nonnull PTPDFViewCtrl *)pdfViewCtrl;
Swift
init(pdfViewCtrl: PTPDFViewCtrl)
Parameters
pdfViewCtrl
a pointer to the PTPDFViewCtrl that the tool manager will operate.
Return Value
A newly initialized tool manager object.
-
Selects the specified annotation.
Declaration
Objective-C
- (BOOL)selectAnnotation:(nullable PTAnnot *)annotation onPageNumber:(unsigned long)pageNumber;
Swift
func selectAnnotation(_ annotation: PTAnnot?, onPageNumber pageNumber: UInt) -> Bool
Parameters
annotation
the annotation to selected. If annotation is Nil, any selected annotation is deselected, and the tool is set to the default tool, typically PTPanTool.
pageNumber
the page number of the annotation
Return Value
YES
if the annotation was selected,NO
otherwise. -
Prompts the user for bluetooth permission if they have not been already
Used as part of detecting if an Apple Pencil is paired with the device.
Will never prompt on iPhones.
Declaration
Objective-C
- (void)promptForBluetoothPermission;
Swift
func promptForBluetoothPermission()
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
-
A string that will be used to set the author field of annotations that are created.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *annotationAuthor;
Swift
var annotationAuthor: String? { get set }
-
When true, the UIMenuController shows after a tap (in addition to after a long press). The default value of this property is
false
.Declaration
Objective-C
@property (nonatomic) BOOL showMenuOnTap;
Swift
var showMenuOnTap: Bool { get set }
-
When true, the digital signature tool allows the user to save signatures and apply previously saved signatures. The default value of this property is
true
.Declaration
Objective-C
@property (nonatomic) BOOL showDefaultSignature;
Swift
var showDefaultSignature: Bool { get set }
-
Whether the built-in page number indicator is enabled. The default value of this property is
false
.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isPageIndicatorEnabled) BOOL pageIndicatorEnabled;
Swift
var isPageIndicatorEnabled: Bool { get set }
-
Whether the document associated with the
PTPDFViewCtrl
is read-only. The default value isNO
.When in read-only mode, annotation creation and editing are disabled as well as other actions that would modify the document.
Declaration
Objective-C
@property (nonatomic, getter=isReadonly) BOOL readonly;
Swift
var isReadonly: Bool { get set }
-
Whether the tool should only create annotations with Apple Pencil touches and not finger touches.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL annotationsCreatedWithPencilOnly;
Swift
var annotationsCreatedWithPencilOnly: Bool { get }
-
Controls if Apple’s bluetooth permission prompt will be triggered the first time an Apple Pencil touch is detected, so that the system setting to only annotate with the Apple Pencil can be ignored when no Apple Pencil is currently paired with the device.
Declaration
Objective-C
@property (nonatomic) BOOL allowBluetoothPermissionPrompt;
Swift
var allowBluetoothPermissionPrompt: Bool { get set }
-
Controls if Apple’s
UIColorPickerViewController
will be used when modifying annotation styles in thePTAnnotStyleViewController
class. The default value of this property isNO
.Declaration
Objective-C
@property (nonatomic) BOOL useSystemColorPicker;
Swift
var useSystemColorPicker: Bool { get set }
-
The options for text (
PTExtendedAnnotTypeText
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTTextAnnotationOptions *_Nonnull textAnnotationOptions;
Swift
@NSCopying var textAnnotationOptions: PTTextAnnotationOptions { get set }
-
The options for link (
PTExtendedAnnotTypeLink
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull linkAnnotationOptions;
Swift
@NSCopying var linkAnnotationOptions: PTAnnotationOptions { get set }
-
The options for free text (
PTExtendedAnnotTypeFreeText
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTFreeTextAnnotationOptions *_Nonnull freeTextAnnotationOptions;
Swift
@NSCopying var freeTextAnnotationOptions: PTFreeTextAnnotationOptions { get set }
-
The options for date text (
PTExtendedAnnotTypeDateText
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTDateTextAnnotationOptions *_Nonnull dateTextAnnotationOptions;
Swift
@NSCopying var dateTextAnnotationOptions: PTDateTextAnnotationOptions { get set }
-
The options for line (
PTExtendedAnnotTypeLine
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull lineAnnotationOptions;
Swift
@NSCopying var lineAnnotationOptions: PTAnnotationOptions { get set }
-
The options for square (
PTExtendedAnnotTypeSquare
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull squareAnnotationOptions;
Swift
@NSCopying var squareAnnotationOptions: PTAnnotationOptions { get set }
-
The options for circle (
PTExtendedAnnotTypeCircle
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull circleAnnotationOptions;
Swift
@NSCopying var circleAnnotationOptions: PTAnnotationOptions { get set }
-
The options for polygon (
PTExtendedAnnotTypePolygon
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull polygonAnnotationOptions;
Swift
@NSCopying var polygonAnnotationOptions: PTAnnotationOptions { get set }
-
The options for polyline (
PTExtendedAnnotTypePolyline
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull polylineAnnotationOptions;
Swift
@NSCopying var polylineAnnotationOptions: PTAnnotationOptions { get set }
-
The options for highlight (
PTExtendedAnnotTypeHighlight
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTTextMarkupAnnotationOptions *_Nonnull highlightAnnotationOptions;
Swift
@NSCopying var highlightAnnotationOptions: PTTextMarkupAnnotationOptions { get set }
-
The options for underline (
PTExtendedAnnotTypeUnderline
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTTextMarkupAnnotationOptions *_Nonnull underlineAnnotationOptions;
Swift
@NSCopying var underlineAnnotationOptions: PTTextMarkupAnnotationOptions { get set }
-
The options for squiggly (
PTExtendedAnnotTypeSquiggly
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTTextMarkupAnnotationOptions *_Nonnull squigglyAnnotationOptions;
Swift
@NSCopying var squigglyAnnotationOptions: PTTextMarkupAnnotationOptions { get set }
-
The options for strikeout (
PTExtendedAnnotTypeStrikeOut
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTTextMarkupAnnotationOptions *_Nonnull strikeOutAnnotationOptions;
Swift
@NSCopying var strikeOutAnnotationOptions: PTTextMarkupAnnotationOptions { get set }
-
The options for rubber stamp (
PTExtendedAnnotTypeStamp
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull stampAnnotationOptions;
Swift
@NSCopying var stampAnnotationOptions: PTAnnotationOptions { get set }
-
The options for caret (
PTExtendedAnnotTypeCaret
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull caretAnnotationOptions;
Swift
@NSCopying var caretAnnotationOptions: PTAnnotationOptions { get set }
-
The options for ink (
PTExtendedAnnotTypeInk
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull inkAnnotationOptions;
Swift
@NSCopying var inkAnnotationOptions: PTAnnotationOptions { get set }
-
The options for pop-up (
PTExtendedAnnotTypePopup
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull popupAnnotationOptions;
Swift
@NSCopying var popupAnnotationOptions: PTAnnotationOptions { get set }
-
The options for file attachment (
PTExtendedAnnotTypeFileAttachment
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTFileAttachmentAnnotationOptions *_Nonnull fileAttachmentAnnotationOptions;
Swift
@NSCopying var fileAttachmentAnnotationOptions: PTFileAttachmentAnnotationOptions { get set }
-
The options for sound (
PTExtendedAnnotTypeSound
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull soundAnnotationOptions;
Swift
@NSCopying var soundAnnotationOptions: PTAnnotationOptions { get set }
-
The options for movie (
PTExtendedAnnotTypeMovie
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull movieAnnotationOptions;
Swift
@NSCopying var movieAnnotationOptions: PTAnnotationOptions { get set }
-
The options for widget (
PTExtendedAnnotTypeWidget
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTWidgetAnnotationOptions *_Nonnull widgetAnnotationOptions;
Swift
@NSCopying var widgetAnnotationOptions: PTWidgetAnnotationOptions { get set }
-
The options for Screen (
PTExtendedAnnotTypeScreen
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull screenAnnotationOptions;
Swift
@NSCopying var screenAnnotationOptions: PTAnnotationOptions { get set }
-
The options for printer’s mark (
PTExtendedAnnotTypePrinterMark
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull printerMarkAnnotationOptions;
Swift
@NSCopying var printerMarkAnnotationOptions: PTAnnotationOptions { get set }
-
The options for trap network (
PTExtendedAnnotTypeTrapNet
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull trapNetAnnotationOptions;
Swift
@NSCopying var trapNetAnnotationOptions: PTAnnotationOptions { get set }
-
The options for watermark (
PTExtendedAnnotTypeWatermark
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull watermarkAnnotationOptions;
Swift
@NSCopying var watermarkAnnotationOptions: PTAnnotationOptions { get set }
-
The options for 3D (
PTExtendedAnnotType3D
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull threeDimensionalAnnotationOptions;
Swift
@NSCopying var threeDimensionalAnnotationOptions: PTAnnotationOptions { get set }
-
The options for redact (
PTExtendedAnnotTypeRedact
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull redactAnnotationOptions;
Swift
@NSCopying var redactAnnotationOptions: PTAnnotationOptions { get set }
-
The options for projection (
PTExtendedAnnotTypeProjection
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull projectionAnnotationOptions;
Swift
@NSCopying var projectionAnnotationOptions: PTAnnotationOptions { get set }
-
The options for Rich Media (
PTExtendedAnnotTypeRichMedia
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull richMediaAnnotationOptions;
Swift
@NSCopying var richMediaAnnotationOptions: PTAnnotationOptions { get set }
-
The options for arrow (
PTExtendedAnnotTypeArrow
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTArrowAnnotationOptions *_Nonnull arrowAnnotationOptions;
Swift
@NSCopying var arrowAnnotationOptions: PTArrowAnnotationOptions { get set }
-
The options for signature (
PTExtendedAnnotTypeSignature
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTSignatureAnnotationOptions *_Nonnull signatureAnnotationOptions;
Swift
@NSCopying var signatureAnnotationOptions: PTSignatureAnnotationOptions { get set }
-
The options for cloudy (
PTExtendedAnnotTypeCloudy
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull cloudyAnnotationOptions;
Swift
@NSCopying var cloudyAnnotationOptions: PTAnnotationOptions { get set }
-
The options for image stamp (
PTExtendedAnnotTypeImageStamp
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTImageStampAnnotationOptions *_Nonnull imageStampAnnotationOptions;
Swift
@NSCopying var imageStampAnnotationOptions: PTImageStampAnnotationOptions { get set }
-
The options for ruler (
PTExtendedAnnotTypeRuler
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull rulerAnnotationOptions;
Swift
@NSCopying var rulerAnnotationOptions: PTAnnotationOptions { get set }
-
The options for perimeter (
PTExtendedAnnotTypePerimeter
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull perimeterAnnotationOptions;
Swift
@NSCopying var perimeterAnnotationOptions: PTAnnotationOptions { get set }
-
The options for cloudy (
PTExtendedAnnotTypeArea
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull areaAnnotationOptions;
Swift
@NSCopying var areaAnnotationOptions: PTAnnotationOptions { get set }
-
The options for count (
PTExtendedAnnotTypeCount
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull countAnnotationOptions;
Swift
@NSCopying var countAnnotationOptions: PTAnnotationOptions { get set }
-
The options for Apple Pencil drawing (
PTExtendedAnnotTypePencilKit
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull pencilDrawingAnnotationOptions;
Swift
@NSCopying var pencilDrawingAnnotationOptions: PTAnnotationOptions { get set }
-
The options for freehand highlight (
PTExtendedAnnotTypeFreehandHighlight
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull freehandHighlightAnnotationOptions;
Swift
@NSCopying var freehandHighlightAnnotationOptions: PTAnnotationOptions { get set }
-
The options for free text callout (
PTExtendedAnnotTypeCallout
) annotations.Declaration
Objective-C
@property (nonatomic, copy) PTAnnotationOptions *_Nonnull calloutAnnotationOptions;
Swift
@NSCopying var calloutAnnotationOptions: PTAnnotationOptions { get set }
-
Returns the
PTAnnotationOptions
for the specified annotation type.Declaration
Objective-C
- (nullable PTAnnotationOptions *)annotationOptionsForAnnotType: (PTExtendedAnnotType)annotType;
Swift
func annotationOptions(for annotType: PTExtendedAnnotType) -> PTAnnotationOptions?
Parameters
annotType
the annotation type
Return Value
the
PTAnnotationOptions
for the specified annotation type, ornil
if not found. -
Returns whether the specified annotation type can be created.
Declaration
Objective-C
- (BOOL)canCreateExtendedAnnotType:(PTExtendedAnnotType)annotType;
Swift
func canCreateExtendedAnnotType(_ annotType: PTExtendedAnnotType) -> Bool
-
Returns whether the specified annotation type can be edited.
Declaration
Objective-C
- (BOOL)canEditExtendedAnnotType:(PTExtendedAnnotType)annotType;
Swift
func canEdit(_ annotType: PTExtendedAnnotType) -> Bool
-
The tool to use with Apple Pencil. The default pencil tool is
PTPencilDrawingCreate
for iOS 13+, andPTFreeHandCreate
for iOS 12 and below.Note
PTPencilDrawingCreate
is only available on iOS 13 and above.Declaration
Objective-C
@property (nonatomic, strong, nullable) Class pencilTool;
Swift
var pencilTool: AnyClass? { get set }
-
Whether the permissions of an
PTAnnot
, returned via-[PTAnnot GetFlag:]
, are checked when determining whether the annotation can be edited. The default value of this property isNO
.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isAnnotationPermissionCheckEnabled) BOOL annotationPermissionCheckEnabled;
Swift
var isAnnotationPermissionCheckEnabled: Bool { get set }
-
Whether the author of an
PTAnnot
is checked against the currentannotationAuthor
when determining whether the annotation can be edited. The default value of this property isNO
.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isAnnotationAuthorCheckEnabled) BOOL annotationAuthorCheckEnabled;
Swift
var isAnnotationAuthorCheckEnabled: Bool { get set }
-
A boolean value that determines whether text selection is enabled.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isTextSelectionEnabled) BOOL textSelectionEnabled;
Swift
var isTextSelectionEnabled: Bool { get set }
-
A boolean value that determines whether form filling is enabled.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isFormFillingEnabled) BOOL formFillingEnabled;
Swift
var isFormFillingEnabled: Bool { get set }
-
A boolean value that determines whether link following is enabled.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isLinkFollowingEnabled) BOOL linkFollowingEnabled;
Swift
var isLinkFollowingEnabled: Bool { get set }
-
A boolean value that determines whether the eraser tool is enabled.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isEraserEnabled) BOOL eraserEnabled;
Swift
var isEraserEnabled: Bool { get set }
-
A value that determines if the eraser should erase an ink annotation’s individual points, or the entire thing as a single object. The default is to erase individual points (
PTInkEraserModePoints
).Declaration
Objective-C
@property (nonatomic) PTInkEraserMode eraserMode;
Swift
var eraserMode: PTInkEraserMode { get set }
-
A list of annotation types to prevent from being erased by the
PTEraserTool
The array entries are wrapped
PTExtendedAnnotType
enumeration values. ThePTEraser
will not erase any annotations whose type is included in the array. Example:myToolManager.excludedAnnotationTypesForPTEraser = @[@(PTExtendedAnnotTypeStamp)];
The default value of this property isnil
.Declaration
Objective-C
@property (nonatomic, copy, nullable) NSArray<NSNumber *> *eraserExcludedExtendedAnnotTypes;
Swift
var eraserExcludedExtendedAnnotTypes: [NSNumber]? { get set }
-
Determines whether the
PTSmartPen
tool is enabled.The default value of this property is
YES
.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isSmartPenEnabled) BOOL smartPenEnabled;
Swift
var isSmartPenEnabled: Bool { get set }
-
A boolean value that determines whether free text annots should get automatically resized after being edited.
The default value is true.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isAutoResizeFreeTextEnabled) BOOL autoResizeFreeTextEnabled;
Swift
var isAutoResizeFreeTextEnabled: Bool { get set }
-
A boolean value that determines whether measurement annots should snap to document geometry.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isSnapToDocumentGeometryEnabled) BOOL snapToDocumentGeometryEnabled;
Swift
var isSnapToDocumentGeometryEnabled: Bool { get set }
-
A boolean value that determines whether annots should snap to their initial aspect ratio while being resized.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isAnnotationsSnapToAspectRatioEnabled) BOOL annotationsSnapToAspectRatio;
Swift
var isAnnotationsSnapToAspectRatioEnabled: Bool { get set }
-
A boolean value that determines whether annotations are selected immediately after they are created. Default is true, or whatever value was last set by a
PTToolsSettingsManager
.Declaration
Objective-C
@property (nonatomic) BOOL selectAnnotationAfterCreation;
Swift
var selectAnnotationAfterCreation: Bool { get set }
-
Whether multiple annotations can be selected at once.
The default value of this property is
YES
.Declaration
Objective-C
@property (nonatomic) BOOL allowsMultipleAnnotationSelection;
Swift
var allowsMultipleAnnotationSelection: Bool { get set }
-
A boolean value that determines whether PencilKit is used to create new free hand annotations. Availble only on iOS 13.1 and greater. Default is true, or whatever value was last set by a
PTToolsSettingsManager
.Declaration
Objective-C
@property (nonatomic) BOOL freehandUsesPencilKit;
Swift
var freehandUsesPencilKit: Bool { get set }
-
A boolean value that determines whether highlight-only annotations made with PencilKit use a multiply blend mode. Default is true, or whatever value was last set by a
PTToolsSettingsManager
.Declaration
Objective-C
@property (nonatomic) BOOL pencilHighlightMultiplyBlendModeEnabled;
Swift
var pencilHighlightMultiplyBlendModeEnabled: Bool { get set }
-
A value that determines whether only Pencil touches should be used for annotating. Default is to obey the iOS system setting, or whatever value was last set by a
PTToolsSettingsManager
.Declaration
Objective-C
@property (nonatomic) PTPencilInteractionMode pencilInteractionMode;
Swift
var pencilInteractionMode: PTPencilInteractionMode { get set }
-
A boolean value that determines if selected text will include an “edit” option that allows the user to edit the underlying PDF text. This feature is in development and is currently considered Beta. Please contact us if you are interested in a more advanced version than the current behaviour.
Default value is false.
Declaration
Objective-C
@property (nonatomic) BOOL textEditingEnabled;
Swift
var textEditingEnabled: Bool { get set }
-
A boolean value that determines if annotating in reflow mode is enabled.
This property is disabled when the
readonly
property of the tool manager is set.The default value of this property is true.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isAnnotateOnReflowEnabled) BOOL annotateOnReflowEnabled;
Swift
var isAnnotateOnReflowEnabled: Bool { get set }
-
A boolean value that determines if form annots can be selected by long press or by the
PTAnnotSelectTool
multi-selection tool.Default value is false.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isSelectFormAnnotationsEnabled) BOOL selectFormAnnotationsEnabled;
Swift
var isSelectFormAnnotationsEnabled: Bool { get set }
-
A boolean value that determines if moving annotation between pages is allowed. This feature does not currently support moving annotation replies.
Default value is false.
Declaration
Objective-C
@property (nonatomic) BOOL moveAnnotsBetweenPagesEnabled;
Swift
var moveAnnotsBetweenPagesEnabled: Bool { get set }
-
Determines whether a label is shown on perimeter and area annotations.
The default value of this property is false.
Declaration
Objective-C
@property (nonatomic) BOOL showMeasurementLabel;
Swift
var showMeasurementLabel: Bool { get set }
-
A boolean value that determines whether annotation snapping is enabled.
The default value is false.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isAnnotationSnappingEnabled) BOOL annotationSnappingEnabled;
Swift
var isAnnotationSnappingEnabled: Bool { get set }
-
The color of the annotation snapping line. If
null
, the tintColor will be used. Default isnil
.Declaration
Objective-C
@property (nonatomic, strong, nullable) UIColor *annotationSnappingLineColor;
Swift
var annotationSnappingLineColor: UIColor? { get set }
-
A list of annotation types that will not exhibit snapping behaviour.
The array entries are wrapped
PTExtendedAnnotType
enumeration values. An annotation of a type specified here will not snap to other annotations or page center, nor be snapped to by other annotations. Example:myToolManager.annotationSnappingExcludedExtendedAnnotTypes = @[@(PTExtendedAnnotTypeStamp)]
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSArray<NSNumber *> *annotationSnappingExcludedExtendedAnnotTypes;
Swift
var annotationSnappingExcludedExtendedAnnotTypes: [NSNumber]? { get set }
-
A file path pointing to the digital certificate to use for digital signatures.
Declaration
Objective-C
@property (nonatomic, strong) NSURL *_Nonnull digitalCertificateLocation;
Swift
var digitalCertificateLocation: URL { get set }
-
The annotation manager responsible for managing annotation events and state.
Declaration
Objective-C
@property (nonatomic, strong, readonly) PTAnnotationManager *_Nonnull annotationManager;
Swift
var annotationManager: PTAnnotationManager { get }
-
The undo-redo manager responsible for managing the undo/redo chain of the
pdfViewCtrl
.Declaration
Objective-C
@property (nonatomic, strong, readonly) PTUndoRedoManager *_Nonnull undoRedoManager;
Swift
var undoRedoManager: PTUndoRedoManager { get }
-
The page label manager responsible for managing the page labels of the
pdfViewCtrl
.Declaration
Objective-C
@property (nonatomic, strong, readonly) PTPageLabelManager *_Nonnull pageLabelManager;
Swift
var pageLabelManager: PTPageLabelManager { get }
-
The digital signatures manager responsible for validating digital signatures.
Declaration
Objective-C
@property (nonatomic, strong, readonly) PTDigitalSignaturesManager *_Nonnull digitalSignaturesManager;
Swift
var digitalSignaturesManager: PTDigitalSignaturesManager { get }
-
Used to notify the tool manager that an annotation has been added.
Declaration
Objective-C
- (void)annotationAdded:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;
Swift
func annotationAdded(_ annotation: PTAnnot, onPageNumber pageNumber: Int32)
Parameters
annotation
The annotation that was added.
pageNumber
The page number of the PDF that the annotation was added to.
-
Used to notify the tool manager that an annotation will be modified
Declaration
Objective-C
- (void)willModifyAnnotation:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;
Swift
func willModifyAnnotation(_ annotation: PTAnnot, onPageNumber pageNumber: Int32)
Parameters
annotation
The annotation will be modified.
pageNumber
The page number of the PDF that the annotation was modified on.
-
Used to notify the tool manager that an annotation has been modified
Declaration
Objective-C
- (void)annotationModified:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;
Swift
func annotationModified(_ annotation: PTAnnot, onPageNumber pageNumber: Int32)
Parameters
annotation
The annotation that was modified.
pageNumber
The page number of the PDF that the annotation was modified on.
-
Used to notify the tool manager that an annotation will be removed
Declaration
Objective-C
- (void)willRemoveAnnotation:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;
Swift
func willRemoveAnnotation(_ annotation: PTAnnot, onPageNumber pageNumber: Int32)
Parameters
annotation
The annotation will be removed.
pageNumber
The page number of the PDF that the annotation was removed from.
-
Used to notify the tool manager that an annotation has been removed.
Declaration
Objective-C
- (void)annotationRemoved:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;
Swift
func annotationRemoved(_ annotation: PTAnnot, onPageNumber pageNumber: Int32)
Parameters
annotation
The annotation that was removed.
pageNumber
The page number of the PDF that the annotation was removed from.
-
Used to notify the tool manager that an annotation will be flattened
Declaration
Objective-C
- (void)willFlattenAnnotation:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;
Swift
func willFlattenAnnotation(_ annotation: PTAnnot, onPageNumber pageNumber: Int32)
Parameters
annotation
The annotation will be flattened.
pageNumber
The page number of the PDF that the annotation will be flattened onto.
-
Used to notify the tool manager that an annotation has been flattened.
Declaration
Objective-C
- (void)annotationFlattened:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;
Swift
func annotationFlattened(_ annotation: PTAnnot, onPageNumber pageNumber: Int32)
Parameters
annotation
The annotation that was flattened.
pageNumber
The page number of the PDF that the annotation was flattened onto.
-
Used to notify the tool manager that the data of a form field has been modified.
Declaration
Objective-C
- (void)formFieldDataModified:(nonnull PTAnnot *)annotation onPageNumber:(int)pageNumber;
Swift
func formFieldDataModified(_ annotation: PTAnnot, onPageNumber pageNumber: Int32)
Parameters
annotation
The form field annotation that has modified data.
pageNumber
The page number of the PDF that the form field annotation is on.
-
Used to notify the tool manager that a page has been added.
Declaration
Objective-C
- (void)pageAddedForPageNumber:(int)pageNumber;
Swift
func pageAdded(forPageNumber pageNumber: Int32)
Parameters
pageNumber
The page number of the page that was added.
-
Used to notify the tool manager that a page has been moved. *
- - parameter: oldPageNumber The old page number of the page.
- - parameter: newPageNumber The new page number of the page.
Declaration
Objective-C
- (void)pageMovedFromPageNumber:(int)oldPageNumber toPageNumber:(int)newPageNumber;
Swift
func pageMoved(fromPageNumber oldPageNumber: Int32, toPageNumber newPageNumber: Int32)
-
Used to notify the tool manager that a page has been removed.
Declaration
Objective-C
- (void)pageRemovedForPageNumber:(int)pageNumber;
Swift
func pageRemoved(forPageNumber pageNumber: Int32)
Parameters
pageNumber
The page number of the page that was removed.
-
Used to notify the tool manager that a page will be rotated.
Declaration
Objective-C
- (void)willRotatePageForPageNumber:(int)pageNumber;
Swift
func willRotatePage(forPageNumber pageNumber: Int32)
Parameters
pageNumber
the page number of the page that will be rotated
-
Used to notify the tool manager that pages in the document will be rotated.
Declaration
Objective-C
- (void)willRotatePagesForPageNumbers:(nonnull NSIndexSet *)pageNumbers;
Swift
func willRotatePages(forPageNumbers pageNumbers: IndexSet)
Parameters
pageNumbers
the page numbers of the pages that will be rotated
-
Used to notify the tool manager that a page was rotated.
Declaration
Objective-C
- (void)didRotatePageForPageNumber:(int)pageNumber;
Swift
func didRotatePage(forPageNumber pageNumber: Int32)
Parameters
pageNumber
the page number of the page that was rotated
-
Used to notify the tool manager that pages in the document were rotated.
Declaration
Objective-C
- (void)didRotatePagesForPageNumbers:(nonnull NSIndexSet *)pageNumbers;
Swift
func didRotatePages(forPageNumbers pageNumbers: IndexSet)
Parameters
pageNumbers
the page numbers of the pages that were rotated
-
Adds the specified observer to the list of observers to be notified of changes in the tool manager.
Note
Theobserver
object is held weakly internally and it is not necessary to remove an observer before it is deallocated.Declaration
Objective-C
- (void)addObserver:(nonnull id<PTToolManagerObserver>)observer;
Swift
func add(_ observer: any PTToolManagerObserver)
-
Removes the specified observer from the list of observers to be notified of changes in the tool manager.
Declaration
Objective-C
- (void)removeObserver:(nonnull id<PTToolManagerObserver>)observer;
Swift
func remove(_ observer: any PTToolManagerObserver)