PSPDFDocumentPermissions

Objective-C

enum PSPDFDocumentPermissions : NSUInteger {}

Swift

struct DocumentPermissions : OptionSet, @unchecked Sendable

A set of flags specifying which operations shall be permitted when the document is opened with user access.

  • Undocumented

    Declaration

    Objective-C

    PSPDFDocumentPermissionsNoFlags = 0
  • Print the document. See also PSPDFDocumentPermissionsPrintHighQuality. (Security handlers of revision 3 or greater)

    Declaration

    Objective-C

    PSPDFDocumentPermissionsPrinting = 1 << 0

    Swift

    static var printing: DocumentPermissions { get }
  • Modify the contents of the document

    Declaration

    Objective-C

    PSPDFDocumentPermissionsModification = 1 << 1

    Swift

    static var modification: DocumentPermissions { get }
  • (Security handlers of revision 2) Copy or otherwise extract text and graphics from the document, including extracting text and graphics (in support of accessibility to users with disabilities or for other purposes). (Security handlers of revision 3 or greater) Copy or otherwise extract text and graphics from the document by operations other than that controlled by bit 10.

    Declaration

    Objective-C

    PSPDFDocumentPermissionsExtract = 1 << 2

    Swift

    static var extract: DocumentPermissions { get }
  • Add or modify text annotations, fill in interactive form fields, and, if bit 4 is also set, create or modify interactive form fields (including signature fields).

    Declaration

    Objective-C

    PSPDFDocumentPermissionsAnnotationsAndForms = 1 << 3

    Swift

    static var annotationsAndForms: DocumentPermissions { get }
  • (Security handlers of revision 3 or greater) Fill in existing interactive form fields (including signature fields), even if bit 6 is clear.

    Declaration

    Objective-C

    PSPDFDocumentPermissionsFillForms = 1 << 4

    Swift

    static var fillForms: DocumentPermissions { get }
  • Unused. This bit was previously to restrict extracting text and graphics for accessibility (e.g. VoiceOver). PDF 2.0 deprecated this option. PSPDFKit ignores this option and does not show this option is the UI (PDFDocumentSecurityViewController). You should refrain from disabling this permission in order to improve accessibility in PDF readers that do not yet follow the recommendations of PDF 2.0.

    Declaration

    Objective-C

    PSPDFDocumentPermissionsExtractAccessibility = 1 << 5

    Swift

    static var extractAccessibility: DocumentPermissions { get }
  • (Security handlers of revision 3 or greater) Assemble the document (insert, rotate, or delete pages and create document outline items or thumbnail images), even if bit 4 is clear.

    Declaration

    Objective-C

    PSPDFDocumentPermissionsAssemble = 1 << 6

    Swift

    static var assemble: DocumentPermissions { get }
  • The PDF reference states that this permission may be restricted to only allow printing with degraded quality (if the printing permission is also granted). Since iOS only offers a single printing pipeline, restricting this permission has no effect on PSPDFKit for iOS. If the printing permission is granted then printing may always be high quality.

    Declaration

    Objective-C

    PSPDFDocumentPermissionsPrintHighQuality = 1 << 7

    Swift

    static var printHighQuality: DocumentPermissions { get }