Annotations

  • Base class for Line, Polygon and PolyLine annotations.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAbstractLineAnnotation : PSPDFAbstractShapeAnnotation

    Swift

    class AbstractLineAnnotation : AbstractShapeAnnotation
  • Undocumented

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAbstractShapeAnnotation : PSPDFAnnotation

    Swift

    class AbstractShapeAnnotation : Annotation
  • Base class for Highlight, Underline, StrikeOut and Squiggly annotations. You should never create instances of this class directly. Use one of its subclasses instead.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFTextMarkupAnnotation : PSPDFAnnotation

    Swift

    class TextMarkupAnnotation : Annotation
  • PSPDFAnnotation is the base class for all PDF annotations and forms.

    Don’t directly make an instance of this class, use subclasses like PSPDFNoteAnnotation or PSPDFLinkAnnotation. This class will return nil if initialized directly, unless with the type PSPDFAnnotationTypeUndefined.

    PSPDFAnnotationManager searches the runtime for subclasses of PSPDFAnnotation and builds up a dictionary using supportedTypes.

    Note

    Thread safety: Annotation objects should only ever be edited on the main thread. Modify properties on the main thread only if they are already active (for creation, it doesn’t matter which thread creates them). Before rendering, obtain a copy of the annotation to ensure it’s not mutated while properties are read. Once the documentProvider is set, modifying properties on a background thread will throw an exception.

    Annotation properties are specified in normalized PDF coordinates: they take page rotation and CropBox offset into account. Prior to PSPDFKit 8 for iOS and PSPDFKit 3 for macOS properties were specified in PDF coordinates: not taking the page rotation and offset into account. After unarchiving annotations from NSCoder archives created with older versions of PSPDFKit, the properties will be untransformed, and will be modified to apply the page transform when the annotation is added to a document.

    Annotations contain internal state once they are attached to a document. Don’t take them and add them to another document. Instead, create a new annotation and set the properties relevant for you, and add this annotation.

    Warning

    Annotations are mutable objects. Do not store them in NSSet or other objects that require a hash-value that does not change.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotation : PSPDFModel <PSPDFUndoSupport, NSSecureCoding>

    Swift

    class Annotation : ModelObject, UndoSupport, NSSecureCoding
  • The types of author-specific state that may be associated with an annotation. States are grouped into categories defined by PSPDFAnnotationAuthorStateModel. See the Annotation States section in the PDF specification.

    See more

    Declaration

    Objective-C

    enum PSPDFAnnotationAuthorState {}
  • Collects annotations from the various PSPDFAnnotationProvider implementations.

    Usually you want to add your custom PSPDFAnnotationProvider instead of subclassing this class. If you subclass, use overrideClass:withClass: in PSPDFDocument.

    This class will set the documentProvider on both annotation adding and retrieving. You don’t have to handle this in your annotationProvider subclass.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationManager
        : NSObject <PSPDFAnnotationProviderChangeNotifier, PSPDFOverridable>

    Swift

    class AnnotationManager : NSObject, AnnotationProviderChangeNotifier, Overridable
  • With the annotation provider, you can mix in PDF annotations from any source (custom database, web, etc) Implement your custom provider class and register it in the PSPDFAnnotationManager.

    (Make sure to register the provider in the PSPDFDocument’s didCreateDocumentProvider: method, since a PSPDFDocument can have multiple PSPDFDocumentProviders and thus multiple PSPDFAnnotationProviders - and they can also be discarded on low memory situations.)

    Ensure everything is thread safe here - methods will be called from any threads and sometimes even concurrently at the same time. (If you’re doing parsing, block and then in the queue re-check so you’re not parsing multiple times for the same page)

    Note

    You should always use PSPDFContainerAnnotationProvider as the base class for your custom annotation provider.
    See more

    Declaration

    Objective-C

    @protocol PSPDFAnnotationProvider <NSObject>

    Swift

    protocol AnnotationProvider : NSObjectProtocol
  • An annotation set may be used to add and position multiple annotations.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationSet : PSPDFModel <NSFastEnumeration, NSSecureCoding>

    Swift

    class AnnotationSet : ModelObject, NSFastEnumeration, NSSecureCoding
  • Defines an annotation style.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationStyle : PSPDFModel <NSSecureCoding>

    Swift

    class AnnotationStyle : ModelObject, NSSecureCoding
  • The annnotation style manager will save UI-specific properties for annotations and apply them after creation.

    It also offers a selection of user-defined styles. There are three categories: Last used, key-specific and generic styles.

    See more

    Declaration

    Objective-C

    @protocol PSPDFAnnotationStyleManager

    Swift

    protocol AnnotationStyleManager
  • Produces a summary of the annotations in a document.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationSummarizer : NSObject

    Swift

    class AnnotationSummarizer : NSObject
  • Abstract subclass that contains an asset from a link

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAssetAnnotation : PSPDFLinkAnnotation

    Swift

    class AssetAnnotation : LinkAnnotation
  • A caret annotation (PDF 1.5) is a visual symbol that indicates the presence of text edits, and share much similarity with note (text) annotations.

    Declaration

    Objective-C

    
    @interface PSPDFCaretAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class CaretAnnotation : Annotation, Overridable
  • The PDF Circle annotations (PDF 1.3) shall display an ellipse on the page.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFCircleAnnotation
        : PSPDFAbstractShapeAnnotation <PSPDFOverridable>

    Swift

    class CircleAnnotation : AbstractShapeAnnotation, Overridable
  • Default container for annotations. It’s crucial that you use this class as your base class if you implement a custom annotation provider, because this class offers efficient undo/redo which otherwise is almost impossible to replicate unless you understand the PSPDFKit internals extremely well.

    This class conforms to the deprecated protocol PSPDFAnnotationProviderRefreshing. In a future release, this protocol will be removed. The reason is that this class handles refreshing internally. This class will continue to conform to PSPDFAnnotationProvider.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFContainerAnnotationProvider
        : NSObject <PSPDFAnnotationProviderRefreshing, PSPDFUndoSupport>

    Swift

    class PDFContainerAnnotationProvider : NSObject, PSPDFAnnotationProviderRefreshing, UndoSupport
  • Undocumented

    See more

    Declaration

    Objective-C

    typedef struct PSPDFDrawingPoint PSPDFDrawingPoint
  • PDF File Attachment Annotation (see 12.5.6.15, “File attachment annotations”). A file attachment annotation (PDF 1.3) contains a reference to a file, which typically shall be embedded in the PDF file (see 7.11.4, “Embedded file streams”).

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFileAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class FileAnnotation : Annotation, Overridable
  • An implementation of the PSPDFAnnotationProvider protocol that uses the PDF document as source/target to load/save annotations. You almost always want to use the PSPDFFileAnnotationProvider in your PSPDFAnnotationManager. You can also use this class inside a custom annotation provider, to parse PDF annotations once and then manage them in your custom database.

    Note

    Subclassing PSPDFFileAnnotationProvider will lead to slower PSPDFProcessor performance and is strongly discouraged. This will be blocked in future versions.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFFileAnnotationProvider
        : PSPDFContainerAnnotationProvider <PSPDFOverridable>

    Swift

    class PDFFileAnnotationPovider : PDFContainerAnnotationProvider, Overridable
  • PDF FreeText Annotation.

    A free text annotation (PDF 1.3) displays text directly on the page. Unlike an ordinary text annotation (see 12.5.6.4, “Text Annotations”), a free text annotation has no open or closed state; instead of being displayed in a pop-up window, the text shall be always visible.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFreeTextAnnotation
        : PSPDFAnnotation <PSPDFRotatable, PSPDFOverridable>

    Swift

    class FreeTextAnnotation : Annotation, Rotatable, Overridable
  • Text Highlight Annotation

    Warning

    If you programmatically create a highlight annotation, you need to both set the boundingBox AND the rects array. The rects array contains boxed variants of CGRect (NSValue).

    Declaration

    Objective-C

    
    @interface PSPDFHighlightAnnotation
        : PSPDFTextMarkupAnnotation <PSPDFOverridable>

    Swift

    class HighlightAnnotation : TextMarkupAnnotation, Overridable
  • PDF Ink Annotation (Free Drawing) Lines are automatically transformed when the boundingBox is changed.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFInkAnnotation : PSPDFAbstractShapeAnnotation <PSPDFOverridable>

    Swift

    class InkAnnotation : AbstractShapeAnnotation, Overridable
  • PDF Line annotation.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFLineAnnotation : PSPDFAbstractLineAnnotation <PSPDFOverridable>

    Swift

    class LineAnnotation : AbstractLineAnnotation, Overridable
  • The PSPDFLinkAnnotation represents both classic PDF page/document/web links, and more types not supported by other PDF readers (video, audio, image, etc)

    PSPDFKit will automatically figure out the type for PDF link annotations loaded from a document, based on the file type. (“mp4” belongs to PSPDFLinkAnnotationVideo; a YouTube-URL to PSPDFLinkAnnotationYouTube, etc)

    If you create a PSPDFLinkAnnotation at runtime, be sure to set the correct type and use the URL parameter for your link. boundingBox defines the frame, in PDF space coordinates.

    If you want to customize how links look in the PDF, customize PSPDFLinkAnnotationView’s properties. There’s currently no mapping between color/lineWidth/etc and the properties of the view. This might change in a future release.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFLinkAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class LinkAnnotation : Annotation, Overridable
  • PDF Note (Text) Annotation.

    Note

    Note annotations are rendered as fixed size; much like how Adobe Acrobat renders them. PSPDFKit will always render note annotations at a fixed size of 32x32pt. We recommend that you set the boundingBox to the same value.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFNoteAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class NoteAnnotation : Annotation, Overridable
  • Polyline annotations (PDF 1.5) are similar to polygons (`PSPDFPolygonAnnotation), except that the first and last vertex are not implicitly connected.

    Note

    See PSPDFAbstractLineAnnotation for details how to use and initialize.

    Declaration

    Objective-C

    
    @interface PSPDFPolyLineAnnotation
        : PSPDFAbstractLineAnnotation <PSPDFOverridable>

    Swift

    class PolyLineAnnotation : AbstractLineAnnotation, Overridable
  • Polygon annotations (PDF 1.5) display closed polygons on the page. Such polygons may have any number of vertices connected by straight lines. Polyline annotations (PDF 1.5) are similar to polygons, except that the first and last vertex are not implicitly connected.

    Note

    See PSPDFAbstractLineAnnotation for details how to use and initialize.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFPolygonAnnotation
        : PSPDFAbstractLineAnnotation <PSPDFOverridable>

    Swift

    class PolygonAnnotation : AbstractLineAnnotation, Overridable
  • Undocumented

    See more

    Declaration

    Objective-C

    
    @interface PSPDFPopupAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class PopupAnnotation : Annotation, Overridable
  • Redaction Annotation

    Used to remove content from a document.

    color can be used to change the color of the overlay text. It has no effect if there is no overlay text specified. Defaults to a red color. fillColor specifies the background color of the redaction area after is has been applied. The color is drawn on all the specified rects. Defaults to black. lineWidth can be set to change the border width of the redaction in its marked state. Defaults to 5.

    Note

    Supports redacting text, images, paths, annotations, and forms.

    Note

    Redaction annotations need to be applied, after they were created and added to a document, to remove the content beneath them. See PSPDFProcessorConfiguration or PSPDFDocumentSaveOptionApplyRedactions for further information.

    Warning

    When programmatically creating a redaction annotation, both boundingBox and rects need to be set. The rects array contains boxed variants of CGRect (NSValue).

    See more

    Declaration

    Objective-C

    
    @interface PSPDFRedactionAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class RedactionAnnotation : Annotation, Overridable
  • RichMedia annotations are defined in the ISO32000 Adobe Supplement and are the modern way of embedding video content. PSPDFKit also supports the matching RichMediaExecute action to control video state.

    Declaration

    Objective-C

    
    @interface PSPDFRichMediaAnnotation : PSPDFAssetAnnotation <PSPDFOverridable>

    Swift

    class RichMediaAnnotation : AssetAnnotation, Overridable
  • A screen annotation (PDF 1.5) specifies a region of a page upon which media clips may be played. It also serves as an object from which actions can be triggered. PSPDFKit also supports the matching Rendition Actions to control the video play state.

    Note

    iOS cannot play all video/audio formats that can be used for PDF.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFScreenAnnotation : PSPDFAssetAnnotation <PSPDFOverridable>

    Swift

    class ScreenAnnotation : AssetAnnotation, Overridable
  • A sound annotation (PDF 1.2) shall analogous to a text annotation except that instead of a text note, it contains sound recorded from the iOS device’s microphone or imported from a file.

    To ensure maximum compatibility set the boundingBox for sound annotations to the same size Adobe Acrobat uses (20x15pt). PSPDFKit will always render sound annotations at a fixed size of 74x44pt, centered in the provided boundingBox.

    Note

    Make sure you configured Microphone Permissions in your app. See https://pspdfkit.com/guides/ios/current/getting-started/permissions/#toc_microphone-permissions for futher documentation.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFSoundAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class SoundAnnotation : Annotation, Overridable
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PSPDFSoundAnnotationController : NSObject
    
    /**
     Stops any currently active recording or playback, except the sender.
     If the sender is nil, all annotations are stopped.
     */
    + (void)stopRecordingOrPlaybackForAllExcept:(nullable id)sender;
    
    /// Checks if we have permission to record.
    + (void)requestRecordPermission:(nullable void (^)(BOOL granted))block;
    
    PSPDF_EMPTY_INIT_UNAVAILABLE
    
    - (instancetype)initWithSoundAnnotation:(PSPDFSoundAnnotation *)annotation NS_DESIGNATED_INITIALIZER;
    
    /// The controlled sound annotation.
    @property (nonatomic, weak, readonly) PSPDFSoundAnnotation *annotation;
    
    /// The current playback state.
    @property (nonatomic, readonly) PSPDFSoundAnnotationState state;
    
    /// The duration of the audio playback
    @property (nonatomic, readonly) NSTimeInterval playbackDuration;
    
    /// Starts or resumes playback.
    - (BOOL)startPlayback:(NSError **)error;
    
    /// Pauses playback or recording.
    - (void)pause;
    
    /// Stops playback or recording.
    - (BOOL)stop:(NSError **)error;
    
    #if !TARGET_OS_WATCH
    
    /// The audio player object. Only available if playback is ongoing or prepared.
    @property (nonatomic, readonly, nullable) AVAudioPlayer *audioPlayer;
    
    #endif
    
    #if PSPDF_HAS_RECORDING_FEATURE
    
    /// Starts or resumes recording.
    - (BOOL)startRecording:(NSError **)error;
    
    /// Discards the current recording.
    - (void)discardRecording;
    
    #endif
    
    @end

    Swift

    class SoundAnnotationController : NSObject
  • The PDF Square annotations (PDF 1.3) shall display a rectangle on the page.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSquareAnnotation
        : PSPDFAbstractShapeAnnotation <PSPDFOverridable>

    Swift

    class SquareAnnotation : AbstractShapeAnnotation, Overridable
  • Text Squiggly Annotation

    Warning

    If you programmatically create a squiggly annotation, you need to both set the boundingBox AND the rects array. The rects array contains boxed variants of CGRect (NSValue).

    Declaration

    Objective-C

    
    @interface PSPDFSquigglyAnnotation
        : PSPDFTextMarkupAnnotation <PSPDFOverridable>

    Swift

    class SquigglyAnnotation : TextMarkupAnnotation, Overridable
  • PDF stamp annotation.

    Stamp annotations that have no image and no known stampType will render their title. title is a PSPDFKit addition that is not part of the PDF specification.

    Stamps may be rotated using the rotation property from PSPDFRotatable. Rotation is not supported for vector stamps.

    Note

    Make sure you configured Image Permissions in your app. See https://pspdfkit.com/guides/ios/current/getting-started/permissions/#toc_image-permissions for further documentation.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFStampAnnotation
        : PSPDFAnnotation <PSPDFRotatable, PSPDFOverridable>

    Swift

    class StampAnnotation : Annotation, Rotatable, Overridable
  • Text StrikeOut Annotation

    Warning

    If you programmatically create a strikeout annotation, you need to both set the boundingBox AND the rects array. The rects array contains boxed variants of CGRect (NSValue).

    Declaration

    Objective-C

    
    @interface PSPDFStrikeOutAnnotation
        : PSPDFTextMarkupAnnotation <PSPDFOverridable>

    Swift

    class StrikeOutAnnotation : TextMarkupAnnotation, Overridable
  • Text Underline Annotation

    Warning

    If you programmatically create an underline annotation, you need to both set the boundingBox AND the rects array. The rects array contains boxed variants of CGRect (NSValue).

    Declaration

    Objective-C

    
    @interface PSPDFUnderlineAnnotation
        : PSPDFTextMarkupAnnotation <PSPDFOverridable>

    Swift

    class UnderlineAnnotation : TextMarkupAnnotation, Overridable
  • The PDF ‘Widget’ annotation. A Widget usually is a button, much like a link annotation.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFWidgetAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class WidgetAnnotation : Annotation, Overridable
  • Advanced appearance characteristics for a widget annotation. It contains additional information for constructing the annotation’s appearance stream

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAppearanceCharacteristics
        : PSPDFModel <NSSecureCoding, PSPDFOverridable>

    Swift

    class AppearanceCharacteristics : ModelObject, NSSecureCoding, Overridable
  • Container object for storing a signature containing an ink annotation and an optional signer.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSignatureContainer : NSObject <NSSecureCoding, PSPDFOverridable>

    Swift

    class SignatureContainer : NSObject, NSSecureCoding, Overridable
  • A instance of this protocol can be set on any PSPDFAnnotation and instead of using the PSPDFKit provided appearance stream generation methods, any PDF can be returned.

    The annotation will use the first page of the returned PDF as its appearance and this content will be embedded into the PDF.

    See more

    Declaration

    Objective-C

    @protocol PSPDFAppearanceStreamGenerating <NSObject>

    Swift

    protocol PSPDFAppearanceStreamGenerating : NSObjectProtocol
  • The default appearance stream generator.

    Calls -[PSPDFAnnotation drawInContext:options:] and transforms it into an appearance stream.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFDrawingContextAppearanceStreamGenerator
        : NSObject <PSPDFAppearanceStreamGenerating>

    Swift

    class DrawingContextAppearanceStreamGenerator : NSObject, PSPDFAppearanceStreamGenerating
  • An appearance stream generator that makes sure to retain the current appearance stream.

    Declaration

    Objective-C

    
    @interface PSPDFRetainExistingAppearanceStreamGenerator
        : NSObject <PSPDFAppearanceStreamGenerating>

    Swift

    class RetainExistingAppearanceStreamGenerator : NSObject, PSPDFAppearanceStreamGenerating
  • An appearance stream generator that takes an NSURL to any PDF file and returns it as the appearance stream.

    Custom appearance streams are only intended to be used with stamp annotations to create a vector stamp. Using this class with other annotation types is not supported.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFileAppearanceStreamGenerator
        : NSObject <PSPDFAppearanceStreamGenerating>

    Swift

    class FileAppearanceStreamGenerator : NSObject, PSPDFAppearanceStreamGenerating
  • Annotations that can be rotated conform to this protocol.

    See more

    Declaration

    Objective-C

    @protocol PSPDFRotatable <NSObject>

    Swift

    protocol Rotatable : NSObjectProtocol
  • Defines the z-index position where an annotation should be moved to.

    See more

    Declaration

    Objective-C

    enum PSPDFAnnotationZIndexMove {}
  • Protcol allowing annotation updates.

    See more

    Declaration

    Objective-C

    @protocol PSPDFAnnotationUpdate <NSObject>

    Swift

    protocol AnnotationUpdate : NSObjectProtocol
  • Property keys for annotation inspector customization.

    See

    PSPDFAnnotationStyleViewController

    See

    PSPDFConfiguration

    Declaration

    Objective-C

    typedef NSString *PSPDFAnnotationStyleKey
  • Displays information about an annotation.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationCell
        : PSPDFNonAnimatingTableViewCell <PSPDFOverridable>

    Swift

    class AnnotationCell : NonAnimatingTableViewCell, Overridable
  • A fully KVO observable stand in for actual annotation content that is loaded on demand.

    Custom annotation providers may need to resolve certain annotation types using external sources. Instant, for example, only loads image annotations separately from the document and other annotations on demand, thus giving users the quickest possible time to display and sync, without sacrificing high fidelity for high bandwidth media.

    This, however, requires a mechanism to display placeholder content for annotations whose media is not readily available. PSPDFAnnotationPlaceholder fulfills that role by offering a state machine that tracks the process towards replacing a suitable placehoöder with the actual content.

    States and Allowed Transitions

    Each annotation placeholder starts in an idle state. Any PSPDFAnnotationPresenting view that implements the annotationPlaceholder property can use that object’s content to display a suitable placeholder until the actual content has become available.

    In order to provide feedback as to when the actual content will be available, it can observe the placeholder’s placeholderState, which will change to “progressing” or “failed” when the process of providing the actual content starts or has failed.

    Note

    Important: In the context of PSPDFAnnotationPlaceholder, cancellation is considered an error. It will be signaled by an NSUserCancelled error in combination with state “failed”.

    While the actual content for the placeholder instance is loaded, the object remains in state “progressing” until the process completes — which results in a transition to state “completed” — or fails — which results in a transition to state “failed”. Both of these states are final, meaning there will not be any further state transitions.

    Upon transition to state “completed”, any PSPDFAnnotationPresenting view tracking a placeholder should dispose of the object, and use its new content property instead.

    Upon transition to state “failed”, any such view should update based on the placeholder object’s error, which (in many cases) will provide a localizedRecoverySuggestion, alongside a recoveryAttempter.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationPlaceholder : NSObject

    Swift

    class AnnotationPlaceholder : NSObject
  • Annotation Set cell, displays an annotation set.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationSetCell
        : PSPDFSelectableCollectionViewCell <PSPDFOverridable>

    Swift

    class AnnotationSetCell : SelectableCollectionViewCell, Overridable
  • Shows multiple annotation sets within a table cell.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationSetsCell
        : PSPDFTableViewCell <UICollectionViewDelegate, UICollectionViewDataSource>

    Swift

    class AnnotationSetsCell : PDFTableViewCell, UICollectionViewDelegate, UICollectionViewDataSource
  • PSPDFAnnotationStateManager holds the current annotation state and configures the associated PSPDFViewController to accept input related to the currently selected annotation state. The class also provides several convenience methods and user interface components required for annotation creation and configuration.

    Interested parties can use KVO to observe the manager’s properties.

    You should never use more than one PSPDFAnnotationStateManager for any given PSPDFViewController. It’s recommended to use -[PSPDFViewController annotationStateManager] instead of creating your own one in order to make sure this requirement is always met.

    PSPDFAnnotationStateManager is internally used by PSPDFAnnotationToolbar and can be re-used for any custom annotation related user interfaces.

    Note

    Do not create this class yourself. Use the existing class that is exposed in the PSPDFViewController.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationStateManager
        : NSObject <PSPDFOverridable, UIPencilInteractionDelegate>

    Swift

    class AnnotationStateManager : NSObject, Overridable, UIPencilInteractionDelegate
  • Generic annotation view that listens on annotation changes.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationView : UIView <PSPDFAnnotationPresenting>

    Swift

    class AnnotationView : UIView, AnnotationPresenting
  • Conforming to this protocol indicates instances can present an annotation and react to events such as page show/hide (to pause video, for example)

    See more

    Declaration

    Objective-C

    @protocol PSPDFAnnotationPresenting <NSObject>

    Swift

    protocol AnnotationPresenting : NSObjectProtocol
  • Button that shows a selected color. Highlightable.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFColorButton : PSPDFButton <PSPDFOverridable>

    Swift

    class ColorButton : PDFButton, Overridable
  • PSPDFDrawView allows drawing or erasing on top of a PSPDFPageView and handles new annotation creation.

    Unless otherwise noted, boxed points need to be of type PSPDFDrawingPoint.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFDrawView
        : PSPDFContainerView <PSPDFAnnotationPresenting, PSPDFOverridable>

    Swift

    class DrawView : PDFContainerView, AnnotationPresenting, Overridable
  • Draws a circle shape representing the user touch during erasing.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFEraseOverlay : UIView <PSPDFOverridable>

    Swift

    class EraseOverlay : UIView, Overridable
  • Generic view for form elements. Adds the form accessory view and additional keyboard support. Form views are not synced with the page to allow snappier editing.

    Declaration

    Objective-C

    
    @interface PSPDFFormElementView
        : PSPDFHostingAnnotationView <PSPDFFormInputAccessoryViewDelegate>

    Swift

    class PDFFormElementView : HostingAnnotationView, PDFFormInputAccessoryViewDelegate
  • Toolbar for Next|Previous controls for Form Elements.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFormInputAccessoryView : UIView <PSPDFOverridable>

    Swift

    class PDFFormInputAccessoryView : UIView, Overridable
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFFormInputAccessoryViewDelegate<NSObject>
    
    - (void)doneButtonPressedOnFormInputView:(PSPDFFormInputAccessoryView *)inputView;
    - (void)previousButtonPressedOnFormInputView:(PSPDFFormInputAccessoryView *)inputView;
    - (void)nextButtonPressedOnFormInputView:(PSPDFFormInputAccessoryView *)inputView;
    - (void)clearButtonPressedOnFormInputView:(PSPDFFormInputAccessoryView *)inputView;
    
    - (BOOL)formInputViewShouldEnablePreviousButton:(PSPDFFormInputAccessoryView *)inputView;
    - (BOOL)formInputViewShouldEnableNextButton:(PSPDFFormInputAccessoryView *)inputView;
    - (BOOL)formInputViewShouldEnableClearButton:(PSPDFFormInputAccessoryView *)inputView;
    
    @end

    Swift

    protocol PDFFormInputAccessoryViewDelegate : NSObjectProtocol
  • Free Text accessory toolbar for faster styling.

    See more

    Declaration

    Swift

    class FreeTextAccessoryView : Toolbar, FontPickerViewControllerDelegate, AnnotationStyleViewControllerDelegate, Overridable
  • Free Text View. Allows inline text editing.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFreeTextAnnotationView
        : PSPDFHostingAnnotationView <UITextViewDelegate, PSPDFOverridable>

    Swift

    class FreeTextAnnotationView : HostingAnnotationView, UITextViewDelegate, Overridable
  • View that will render an annotation.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFHostingAnnotationView
        : PSPDFAnnotationView <PSPDFRenderTaskDelegate, PSPDFOverridable>

    Swift

    class HostingAnnotationView : AnnotationView, RenderTaskDelegate, Overridable
  • Base class for all link-annotation subclasses.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFLinkAnnotationBaseView : UIView <PSPDFAnnotationPresenting>

    Swift

    class LinkAnnotationBaseView : UIView, AnnotationPresenting
  • Displays an annotation link.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFLinkAnnotationView
        : PSPDFLinkAnnotationBaseView <PSPDFOverridable>

    Swift

    class LinkAnnotationView : LinkAnnotationBaseView, Overridable
  • Renders a note annotation’s icon on its page. Note annotations are handled as subviews to be draggable.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFNoteAnnotationView : PSPDFAnnotationView <PSPDFOverridable>

    Swift

    class NoteAnnotationView : AnnotationView, Overridable
  • Captures touches and shows selection boxes during dragging. Shows the selection box during dragging when using the annotation selection tool. (The rectange between the start location of dragging and the current touch location.) With the highlight tool, this also shows the proposed text to be highlighted. With the annotation selection tool, this also shows the proposed selected annotations. The selection color is determined by the tintColor property inherited from UIView. This is also used for text block debugging.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSelectionView : UIView <PSPDFOverridable>

    Swift

    class SelectionView : UIView, Overridable
  • Cell that is used for displaying a signature. Displays a label and an image beneath each other.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSignatureCell : UITableViewCell <PSPDFOverridable>

    Swift

    class SignatureCell : UITableViewCell, Overridable
  • Securely stores ink signatures in the keychain. Supports NSSecureCoding since this is part of the PSPDFConfiguration object.

    See more

    Declaration

    Objective-C

    @protocol PSPDFSignatureStore <NSObject, NSSecureCoding>

    Swift

    protocol SignatureStore : NSSecureCoding, NSObjectProtocol