Helper and Abstract Classes

  • An object that manages the controls for adding new pages to a document. New pages can be created from blank page templates (e.g. lined, grid, dotted), added from other documents, or created from images.

    See more

    Declaration

    Objective-C

    
    @interface PTAddPagesManager
        : NSObject <PTOverridable, UIImagePickerControllerDelegate,
                    UINavigationControllerDelegate, UIDocumentPickerDelegate,
                    VNDocumentCameraViewControllerDelegate>

    Swift

    class PTAddPagesManager : NSObject, PTOverridable, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIDocumentPickerDelegate, VNDocumentCameraViewControllerDelegate
  • This class is used to easily add an analytics framework to tools. Events of interest are be passed to (a subclass of) this generic class, and can then passed on to the analytics framework(s) of your choice.

    See more

    Declaration

    Objective-C

    
    @interface PTAnalyticsHandlerAdapter : NSObject

    Swift

    class PTAnalyticsHandlerAdapter : NSObject
  • An object that contains options for a type of annotation.

    See more

    Declaration

    Objective-C

    
    @interface PTAnnotationOptions : NSObject <NSCopying, NSCoding>

    Swift

    class PTAnnotationOptions : NSObject, NSCopying, NSCoding
  • A PTAnnotationPasteboard instance facilitates annotation copying and pasting on the behalf of a PTPDFViewCtrl or PTToolManager instance. Annotation pasteboards can be shared between multiple PDFViewCtrls, viewers, tabs, etc. to allow annotations to be easily copied between documents.

    See more

    Declaration

    Objective-C

    
    @interface PTAnnotationPasteboard : NSObject

    Swift

    class PTAnnotationPasteboard : NSObject
  • This class wraps a PTAnnot and is used to store style appearance and property information before the information is saved back to the annotation.

    See more

    Declaration

    Objective-C

    
    @interface PTAnnotStyle : NSObject <NSCopying, NSCoding, PTOverridable>

    Swift

    class PTAnnotStyle : NSObject, NSCopying, NSCoding, PTOverridable
  • A utility class for managing user bookmarks. Note the the PDF specification does not account for user bookmarks. Therefore user bookmarks are non-portable between PDF readers. PDFNet for iOS stores the bookmarks in the iOS user preferences.

    The bookmark data is an NSArray of NSDictionary-s. Each NSDictionary represents a bookmark. The NSDictionary entries are: {@“page-number” : NSNumber numberWithInt}, {@“sdf-obj-number” : NSNumber numberWithInt}, {@“name” : NSString}, {@“unique-id” : NSString (a UUID string)}

    See more

    Declaration

    Objective-C

    
    @interface PTBookmarkUtils : NSObject

    Swift

    class PTBookmarkUtils : NSObject
  • Allows the user to interact with and set values of choice fields (list boxes).

    See more

    Declaration

    Objective-C

    
    @interface PTChoiceFormViewController
        : UIViewController <UITableViewDelegate, UITableViewDataSource>
  • Used to persist annotion properties to user defaults so that the next annotation of that type that is created can have the same properties.

    See more

    Declaration

    Objective-C

    
    @interface PTColorDefaults : NSObject

    Swift

    class PTColorDefaults : NSObject
  • A UIDocument subclass backed by a PTPDFDoc object.

    To instantiate a new PTCoordinatedDocument, use initWithFileURL:.

    See more

    Declaration

    Objective-C

    
    @interface PTCoordinatedDocument : UIDocument

    Swift

    class PTCoordinatedDocument : UIDocument
  • An abstract class that many of the annotation-creating tools derive from.

    See more

    Declaration

    Objective-C

    
    @interface PTCreateToolBase : PTTool {
      int _pageNumber;
      double _thickness;
    }

    Swift

    class PTCreateToolBase : PTTool
  • The PTDigSigView is used for creating signature path appearances. The view tracks and saves user touches, drawing strokes with the specified color and thickness.

    See more

    Declaration

    Objective-C

    
    @interface PTDigSigView : UIView <PTFontPickerViewControllerDelegate>

    Swift

    class PTDigSigView : UIView, PTFontPickerViewControllerDelegate
  • The PTDigSigViewController allows the user to draw a signature or select an image for a signature form field. A certificate can be used for digital signing.

    See more

    Declaration

    Objective-C

    
    @interface PTDigSigViewController
        : UIViewController <PTOverridable, UIImagePickerControllerDelegate,
                            UINavigationControllerDelegate>

    Swift

    class PTDigSigViewController : UIViewController, PTOverridable, UIImagePickerControllerDelegate, UINavigationControllerDelegate
  • The PTEditToolbar is used while creating certain annotation types and provides buttons for saving or discarding changes, as well as an optional undo/redo interface.

    See more

    Declaration

    Objective-C

    
    @interface PTEditToolbar : UIToolbar <PTOverridable>

    Swift

    class PTEditToolbar : UIToolbar, PTOverridable
  • The PTFloatingSigViewController allows the user to add signatures anywhere on a document. A default signature can be saved for subsequent use.

    See more

    Declaration

    Objective-C

    
    @interface PTFloatingSigViewController
        : UIViewController <PTOverridable, UIImagePickerControllerDelegate,
                            UINavigationControllerDelegate>

    Swift

    class PTFloatingSigViewController : UIViewController, PTOverridable, UIImagePickerControllerDelegate, UINavigationControllerDelegate
  • This class handles the creation of a UIPresentationController that displays its contents covering a portion of the screen, anchored to the bottom of the screen.

    See more

    Declaration

    Objective-C

    
    @interface PTHalfModalPresentationManager
        : NSObject <UIViewControllerTransitioningDelegate,
                    UIPopoverPresentationControllerDelegate>
  • Crops image stamp annotations, created by the PTImageStampCreate tool.

    See more

    Declaration

    Objective-C

    
    @interface PTImageCropTool : PTTool

    Swift

    class PTImageCropTool : PTTool
  • A view controller that displays and allows editing of an annotation’s popup note.

    See more

    Declaration

    Objective-C

    
    @interface PTNoteEditController : UIViewController <PTOverridable>

    Swift

    class PTNoteEditController : UIViewController, PTOverridable
  • The PTOverrides class is used to register overridden subclasses of classes defined in the Tools library. Once a class conforming to the PTOverridable protocol has been “overridden”, whenever an instance of the original class would be created the subclass is used instead.

    See more

    Declaration

    Objective-C

    
    @interface PTOverrides : NSObject

    Swift

    class PTOverrides : NSObject
  • Utility methods for the Tools framework.

    See more

    Declaration

    Objective-C

    
    @interface PTToolsUtil : NSObject

    Swift

    class PTToolsUtil : NSObject
  • The view for the small resize handles that appear for annotation resizing with a PTSelectionRectContainerView.

    See more

    Declaration

    Objective-C

    
    @interface PTResizeWidgetView : UIView
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PTRubberStampManager : NSObject<PTOverridable>
    
    /**
     * The light red  color
     */
    @property (nonatomic, class, strong, readonly) PTRubberStampColorModel *lightRed;
    
    /**
     * The dark red color
     */
    @property (nonatomic, class, strong, readonly) PTRubberStampColorModel *darkRed;
    
    /**
     * The light green color
     */
    @property (nonatomic, class, strong, readonly) PTRubberStampColorModel *lightGreen;
    
    /**
     * The light blue color
     */
    @property (nonatomic, class, strong, readonly) PTRubberStampColorModel *lightBlue;
    
    /**
     * The yellow color
     */
    @property (nonatomic, class, strong, readonly) PTRubberStampColorModel *yellow;
    
    /**
     * The purple color
     */
    @property (nonatomic, class, strong, readonly) PTRubberStampColorModel *purple;
    
    /**
     * All the colors on rubber stamp in an array.
     */
    @property (nonatomic, class, strong, readonly) NSArray<PTRubberStampColorModel*> *stampColors;
    
    /**
     * Used to determine the number of standard stamps.
     *
     * @return the number of standard stamps.
     */
    -(NSUInteger)numberOfStandardStamps;
    
    /**
     * Used to determine the number of custom stamps.
     *
     * @return the number of custom stamps.
     */
    -(NSUInteger)numberOfCustomStamps;
    
    /**
     * An array of standard rubber stamp appearances.
     * This should be an array of `PTCustomStampOption`s
     */
    @property (nonatomic, copy, nullable) NSArray<PTCustomStampOption*> *standardStampOptions;
    
    /**
     * An array of custom rubber stamp appearances.
     * This should be an array of `PTCustomStampOption`s
     */
    @property (nonatomic, copy, nullable) NSArray<PTCustomStampOption*> *customStampOptions;
    
    /**
     *
     * Saves a custom stamp created.
     *
     * @param stamp custom stamp created.
     *
     */
    -(void) saveCustomStampOption:(PTCustomStampOption *)stamp;
    
    /**
     *
     * Returns an image of the stamp with a given `PTCustomStampOption` appearance.
     *
     * @param height The desired height of the output image.
     *
     * @param width The desired width of the output image.
     *
     * @param stampOption A `PTCustomStampOption` appearance object.
     *
     * @return A rasterized copy of the signature.
     *
     */
    +(UIImage*)getBitMapForStampWithHeight:(double)height width:(double)width option:(PTCustomStampOption*)stampOption;
    
    @end

    Swift

    class PTRubberStampManager : NSObject, PTOverridable
  • A text selection end bar.

    See more

    Declaration

    Objective-C

    
    @interface PTSelectionBar : UIView
  • A transparent container view for the shaded PTSelectionRectView and the resize widgets.

    See more

    Declaration

    Objective-C

    
    @interface PTSelectionRectContainerView : UIView <PTOverridable>

    Swift

    class PTSelectionRectContainerView : UIView, PTOverridable
  • For use when editing line and arrow annotations, where the selection rectangle is not shown when the annotation is not being moved, and has a different appearance than other annotation types.

    See more

    Declaration

    Objective-C

    
    @interface PTSelectionRectView : UIView

    Swift

    class PTSelectionRectView : UIView
  • A cell for use by the PTThumbnailsViewController.

    See more

    Declaration

    Objective-C

    
    @interface PTThumbnailViewCell : UICollectionViewCell
  • A UICollectionViewLayout for use with PTThumbnailsViewController.

    See more

    Declaration

    Objective-C

    
    @interface PTThumbnailViewLayout : UICollectionViewFlowLayout

    Swift

    class PTThumbnailViewLayout : UICollectionViewFlowLayout
  • The PTTool base class from which all stock tools derive. These tools implement the PTToolSwitching protocol. For documentation on these methods, please see the protocol documentation, available at http://www.pdftron.com

    See more

    Declaration

    Objective-C

    
    @interface PTTool
        : UIView <PTOverridable, UIGestureRecognizerDelegate, PTToolSwitching,
                  PTNoteEditControllerDelegate, PTLinkPopupViewControllerDelegate,
                  UIPopoverPresentationControllerDelegate,
                  UIAdaptivePresentationControllerDelegate>

    Swift

    class PTTool : UIView, PTOverridable, UIGestureRecognizerDelegate, PTToolSwitching, PTNoteEditControllerDelegate, PTLinkPopupViewControllerDelegate, UIPopoverPresentationControllerDelegate, UIAdaptivePresentationControllerDelegate
  • The PTToolGroupManager class maintains a list of tool groups, represented by instances of the PTToolGroup class, each of which contain a set of available tools for that mode.

    This class is designed to work in conjuction with the PTToolGroupToolbar class to display the tool groups and provide interactive control over the current tool.

    See more

    Declaration

    Objective-C

    
    @interface PTToolGroupManager : NSObject <NSCoding, PTOverridable>

    Swift

    class PTToolGroupManager : NSObject, NSCoding, PTOverridable
  • The PTToolManager class is responsbile for forwarding events from the PDFViewCtrl to Tools, and coordinating the control and data flow between tools.

    See more

    Declaration

    Objective-C

    
    @interface PTToolManager : UIView <PTOverridable, PTPDFViewCtrlToolDelegate,
                                       PTToolEvents, PTToolOptionsDelegate>
  • Creates signatures and manages saved ones.

    See more

    Declaration

    Objective-C

    
    @interface PTSignaturesManager : NSObject <PTOverridable>

    Swift

    class PTSignaturesManager : NSObject, PTOverridable
  • Creates signatures and manages saved ones.

    See more

    Declaration

    Objective-C

    
    @interface PTStampManager : NSObject

    Swift

    class PTStampManager : NSObject
  • Abstract base class for creating text markup annotations, such as highlights, underlines, strikeouts and squigglies.

    See more

    Declaration

    Objective-C

    
    @interface PTTextMarkupCreate : PTTool

    Swift

    class PTTextMarkupCreate : PTTool
  • Tool for editing existing text markup annotations, such as highlights, underlines, etc. In addition to changing basic properties like colour and opacity, it can change the annotation’s size, and it’s type (e.g. turn a highlight into an underline).

    See more

    Declaration

    Objective-C

    
    @interface PTTextMarkupEditTool : PTTextSelectTool

    Swift

    class PTTextMarkupEditTool : PTTextSelectTool
  • The loupe that is used during text selection.

    See more

    Declaration

    Objective-C

    
    @interface PTMagnifierView : UIView <PTOverridable>

    Swift

    class PTMagnifierView : UIView, PTOverridable
  • A user bookmark for a page in a document.

    See more

    Declaration

    Objective-C

    
    @interface PTUserBookmark : NSObject

    Swift

    class PTUserBookmark : NSObject