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, readwrite, nullable) id<PTToolManagerDelegate> delegate;
Swift
weak var delegate: 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 }
-
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly, weak) UIViewController *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()
-
A string that will be used to set the author field of annotations that are created.
Declaration
Objective-C
@property (nonatomic, copy, readwrite, 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, assign, unsafe_unretained, readwrite) 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.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite) 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, assign, unsafe_unretained, readwrite, 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, assign, unsafe_unretained, readwrite) BOOL allowBluetoothPermissionPrompt;
Swift
var allowBluetoothPermissionPrompt: Bool { get set }
-
The options for text (
PTExtendedAnnotTypeText
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTTextAnnotationOptions *_Nonnull textAnnotationOptions;
Swift
@NSCopying var textAnnotationOptions: PTTextAnnotationOptions { get set }
-
The options for link (
PTExtendedAnnotTypeLink
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull linkAnnotationOptions;
Swift
@NSCopying var linkAnnotationOptions: PTAnnotationOptions { get set }
-
The options for free text (
PTExtendedAnnotTypeFreeText
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTFreeTextAnnotationOptions *_Nonnull freeTextAnnotationOptions;
Swift
@NSCopying var freeTextAnnotationOptions: PTFreeTextAnnotationOptions { get set }
-
The options for line (
PTExtendedAnnotTypeLine
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull lineAnnotationOptions;
Swift
@NSCopying var lineAnnotationOptions: PTAnnotationOptions { get set }
-
The options for square (
PTExtendedAnnotTypeSquare
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull squareAnnotationOptions;
Swift
@NSCopying var squareAnnotationOptions: PTAnnotationOptions { get set }
-
The options for circle (
PTExtendedAnnotTypeCircle
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull circleAnnotationOptions;
Swift
@NSCopying var circleAnnotationOptions: PTAnnotationOptions { get set }
-
The options for polygon (
PTExtendedAnnotTypePolygon
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull polygonAnnotationOptions;
Swift
@NSCopying var polygonAnnotationOptions: PTAnnotationOptions { get set }
-
The options for polyline (
PTExtendedAnnotTypePolyline
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull polylineAnnotationOptions;
Swift
@NSCopying var polylineAnnotationOptions: PTAnnotationOptions { get set }
-
The options for highlight (
PTExtendedAnnotTypeHighlight
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTTextMarkupAnnotationOptions *_Nonnull highlightAnnotationOptions;
Swift
@NSCopying var highlightAnnotationOptions: PTTextMarkupAnnotationOptions { get set }
-
The options for underline (
PTExtendedAnnotTypeUnderline
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTTextMarkupAnnotationOptions *_Nonnull underlineAnnotationOptions;
Swift
@NSCopying var underlineAnnotationOptions: PTTextMarkupAnnotationOptions { get set }
-
The options for squiggly (
PTExtendedAnnotTypeSquiggly
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTTextMarkupAnnotationOptions *_Nonnull squigglyAnnotationOptions;
Swift
@NSCopying var squigglyAnnotationOptions: PTTextMarkupAnnotationOptions { get set }
-
The options for strikeout (
PTExtendedAnnotTypeStrikeOut
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTTextMarkupAnnotationOptions *_Nonnull strikeOutAnnotationOptions;
Swift
@NSCopying var strikeOutAnnotationOptions: PTTextMarkupAnnotationOptions { get set }
-
The options for rubber stamp (
PTExtendedAnnotTypeStamp
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull stampAnnotationOptions;
Swift
@NSCopying var stampAnnotationOptions: PTAnnotationOptions { get set }
-
The options for caret (
PTExtendedAnnotTypeCaret
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull caretAnnotationOptions;
Swift
@NSCopying var caretAnnotationOptions: PTAnnotationOptions { get set }
-
The options for ink (
PTExtendedAnnotTypeInk
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull inkAnnotationOptions;
Swift
@NSCopying var inkAnnotationOptions: PTAnnotationOptions { get set }
-
The options for pop-up (
PTExtendedAnnotTypePopup
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull popupAnnotationOptions;
Swift
@NSCopying var popupAnnotationOptions: PTAnnotationOptions { get set }
-
The options for file attachment (
PTExtendedAnnotTypeFileAttachment
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull fileAttachmentAnnotationOptions;
Swift
@NSCopying var fileAttachmentAnnotationOptions: PTAnnotationOptions { get set }
-
The options for sound (
PTExtendedAnnotTypeSound
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull soundAnnotationOptions;
Swift
@NSCopying var soundAnnotationOptions: PTAnnotationOptions { get set }
-
The options for movie (
PTExtendedAnnotTypeMovie
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull movieAnnotationOptions;
Swift
@NSCopying var movieAnnotationOptions: PTAnnotationOptions { get set }
-
The options for widget (
PTExtendedAnnotTypeWidget
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTWidgetAnnotationOptions *_Nonnull widgetAnnotationOptions;
Swift
@NSCopying var widgetAnnotationOptions: PTWidgetAnnotationOptions { get set }
-
The options for Screen (
PTExtendedAnnotTypeScreen
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull screenAnnotationOptions;
Swift
@NSCopying var screenAnnotationOptions: PTAnnotationOptions { get set }
-
The options for printer’s mark (
PTExtendedAnnotTypePrinterMark
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull printerMarkAnnotationOptions;
Swift
@NSCopying var printerMarkAnnotationOptions: PTAnnotationOptions { get set }
-
The options for trap network (
PTExtendedAnnotTypeTrapNet
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull trapNetAnnotationOptions;
Swift
@NSCopying var trapNetAnnotationOptions: PTAnnotationOptions { get set }
-
The options for watermark (
PTExtendedAnnotTypeWatermark
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull watermarkAnnotationOptions;
Swift
@NSCopying var watermarkAnnotationOptions: PTAnnotationOptions { get set }
-
The options for 3D (
PTExtendedAnnotType3D
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull threeDimensionalAnnotationOptions;
Swift
@NSCopying var threeDimensionalAnnotationOptions: PTAnnotationOptions { get set }
-
The options for redact (
PTExtendedAnnotTypeRedact
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull redactAnnotationOptions;
Swift
@NSCopying var redactAnnotationOptions: PTAnnotationOptions { get set }
-
The options for projection (
PTExtendedAnnotTypeProjection
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull projectionAnnotationOptions;
Swift
@NSCopying var projectionAnnotationOptions: PTAnnotationOptions { get set }
-
The options for Rich Media (
PTExtendedAnnotTypeRichMedia
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull richMediaAnnotationOptions;
Swift
@NSCopying var richMediaAnnotationOptions: PTAnnotationOptions { get set }
-
The options for arrow (
PTExtendedAnnotTypeArrow
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull arrowAnnotationOptions;
Swift
@NSCopying var arrowAnnotationOptions: PTAnnotationOptions { get set }
-
The options for signature (
PTExtendedAnnotTypeSignature
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTSignatureAnnotationOptions *_Nonnull signatureAnnotationOptions;
Swift
@NSCopying var signatureAnnotationOptions: PTSignatureAnnotationOptions { get set }
-
The options for cloudy (
PTExtendedAnnotTypeCloudy
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull cloudyAnnotationOptions;
Swift
@NSCopying var cloudyAnnotationOptions: PTAnnotationOptions { get set }
-
The options for image stamp (
PTExtendedAnnotTypeImageStamp
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTImageStampAnnotationOptions *_Nonnull imageStampAnnotationOptions;
Swift
@NSCopying var imageStampAnnotationOptions: PTImageStampAnnotationOptions { get set }
-
The options for ruler (
PTExtendedAnnotTypeRuler
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull rulerAnnotationOptions;
Swift
@NSCopying var rulerAnnotationOptions: PTAnnotationOptions { get set }
-
The options for perimeter (
PTExtendedAnnotTypePerimeter
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull perimeterAnnotationOptions;
Swift
@NSCopying var perimeterAnnotationOptions: PTAnnotationOptions { get set }
-
The options for cloudy (
PTExtendedAnnotTypeArea
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull areaAnnotationOptions;
Swift
@NSCopying var areaAnnotationOptions: PTAnnotationOptions { get set }
-
The options for Apple Pencil drawing (
PTExtendedAnnotTypePencilKit
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull pencilDrawingAnnotationOptions;
Swift
@NSCopying var pencilDrawingAnnotationOptions: PTAnnotationOptions { get set }
-
The options for freehand highlight (
PTExtendedAnnotTypeFreehandHighlight
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) PTAnnotationOptions *_Nonnull freehandHighlightAnnotationOptions;
Swift
@NSCopying var freehandHighlightAnnotationOptions: PTAnnotationOptions { get set }
-
The options for free text callout (
PTExtendedAnnotTypeCallout
) annotations.Declaration
Objective-C
@property (nonatomic, copy, readwrite) 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, readwrite, 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 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, assign, unsafe_unretained, readwrite) BOOL selectAnnotationAfterCreation;
Swift
var selectAnnotationAfterCreation: 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, assign, unsafe_unretained, readwrite) 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, assign, unsafe_unretained, readwrite) 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, assign, unsafe_unretained, readwrite) 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 that the current behaviour.
Default value is false.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite) BOOL textEditingEnabled;
Swift
var textEditingEnabled: Bool { get set }
-
A file path pointing to the digital certificate to use for digital signatures.
Declaration
Objective-C
@property (nonatomic, strong, readwrite) NSURL *_Nonnull digitalCertificateLocation;
Swift
var digitalCertificateLocation: URL { get set }
-
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 }
-
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 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.