PSPDFAnnotationFlags

Objective-C

enum PSPDFAnnotationFlags : NSUInteger {}

Swift

struct Flag : OptionSet

A set of flags specifying various characteristics of the annotation. PSPDFKit doesn’t support all of those flag settings.

  • If set, ignore annotation AP stream if there is no handler available.

    Declaration

    Objective-C

    PSPDFAnnotationFlagInvisible = 1 << 0

    Swift

    static var invisible: Annotation.Flag { get }
  • If set, do not display or print the annotation or allow it to interact with the user.

    Declaration

    Objective-C

    PSPDFAnnotationFlagHidden = 1 << 1

    Swift

    static var hidden: Annotation.Flag { get }
  • If set, print the annotation when the page is printed.

    Declaration

    Objective-C

    PSPDFAnnotationFlagPrint = 1 << 2

    Swift

    static var print: Annotation.Flag { get }
  • [IGNORED] If set, don’t scale the annotation’s appearance to match the magnification of the page.

    Declaration

    Objective-C

    PSPDFAnnotationFlagNoZoom = 1 << 3

    Swift

    static var noZoom: Annotation.Flag { get }
  • [IGNORED] If set, don’t rotate the annotation’s appearance to match the rotation of the page.

    Declaration

    Objective-C

    PSPDFAnnotationFlagNoRotate = 1 << 4

    Swift

    static var noRotate: Annotation.Flag { get }
  • If set, don’t display the annotation on the screen. (But printing might be allowed)

    Declaration

    Objective-C

    PSPDFAnnotationFlagNoView = 1 << 5

    Swift

    static var noView: Annotation.Flag { get }
  • If set, don’t allow the annotation to be deleted or its properties to be modified, including contents.

    This is ignored for widget annotations (form elements).
    For widget annotations the `isReadOnly` property of the associated form field should be used instead.
    
    This flag only restricts the PSDPFKit UI and does not impact programmatic modification of the annotation.
    
    This flag does not restrict adding replies to the annotation, although the replies themselves are
    also annotations so may be marked as read-only.
    
    To transiently make an annotation read-only, use the `isEditable` property instead.
    

    Declaration

    Objective-C

    PSPDFAnnotationFlagReadOnly = 1 << 6

    Swift

    static var readOnly: Annotation.Flag { get }
  • If set, don’t allow the annotation to be deleted or its properties to be modified, except for contents.

    This means the text of free text annotations can still be edited and forms can still be filled.
    To prevent editing the `contents`, enable the `.readOnly` flag or enable both the `.locked` and `.lockedContents` flags.
    
    PSPDFKit follows the PDF reference for this flag by not restricting editing `contents` when this flag
    is enabled. This does not match the behavior of Adobe Acrobat, which seems to treat this flag the same
    as `.readOnly` by also restricting editing `contents` when this flag is set (except for form elements).
    
    The Adobe Acrobat UI allows the user to lock and unlock annotations. PSPDFKit does not include any similar UI.
    
    This flag only restricts the PSDPFKit UI and does not impact programmatic modification of the annotation.
    

    Declaration

    Objective-C

    PSPDFAnnotationFlagLocked = 1 << 7

    Swift

    static var locked: Annotation.Flag { get }
  • [IGNORED] If set, invert the interpretation of the .noView flag for certain events.

    Declaration

    Objective-C

    PSPDFAnnotationFlagToggleNoView = 1 << 8

    Swift

    static var toggleNoView: Annotation.Flag { get }
  • If set, don’t allow the contents of the annotation to be modified by the user.

    To prevent editing other properties or deleting, enable the `.readOnly` flag or enable both the `.locked` and `.lockedContents` flags.
    
    This is ignored for widget annotations (form elements).
    For widget annotations the `isReadOnly` property of the associated form field should be used instead.
    
    This flag only restricts the PSDPFKit UI and does not impact programmatic modification of the annotation.
    
    This flag does not restrict adding replies to the annotation, although the replies themselves are
    also annotations so may have their contents locked.
    

    Declaration

    Objective-C

    PSPDFAnnotationFlagLockedContents = 1 << 9

    Swift

    static var lockedContents: Annotation.Flag { get }