PSPDFDocumentSharingOptions

NS_OPTIONS(NSUInteger, PSPDFDocumentSharingOptions) {
    /// The default option. Will share all available options via embedding annotations.
    PSPDFDocumentSharingOptionNone = 0,

    /// Only the page set in `pageIndex` of `PSPDFViewController`.
    PSPDFDocumentSharingOptionCurrentPageOnly = 1 << 0,
    /// Let the user select a range of pages to share.
    PSPDFDocumentSharingOptionPageRange = 1 << 1,
    /// Send the whole document.
    PSPDFDocumentSharingOptionAllPages = 1 << 2,
    /// Share all pages that contain annotations.
    PSPDFDocumentSharingOptionAnnotatedPages = 1 << 4,

    /**
     Save annotations in the PDF.

     Embed annotations into the PDF.

     @warning When using this option for printing, no annotations may be printed. This is a result of internal limitations of the printing system on iOS.
     @see [3rd-Party Compatibility](https://pspdfkit.com/guides/ios/current/miscellaneous/3rd-party-compatibility/)
     */
    PSPDFDocumentSharingOptionEmbedAnnotations = 1 << 8,
    /// Render annotations into the PDF.
    PSPDFDocumentSharingOptionFlattenAnnotations = 1 << 9,
    /// Save annotations + add summary.
    PSPDFDocumentSharingOptionAnnotationsSummary = 1 << 10,
    /// Remove all annotations.
    PSPDFDocumentSharingOptionRemoveAnnotations = 1 << 11,

    /**
     Render annotations into the PDF,
     remove annotations that are not printable.
     */
    PSPDFDocumentSharingOptionFlattenAnnotationsForPrint = 1 << 12,

    /**
     Offer to use the original file for sharing. See `originalFile` in `PSPDFDocument`.
     For this option, neither page selection nor annotations apply.

     @note If the document isn't backed by a file, then it is written to a file temporarily.
     */
    PSPDFDocumentSharingOptionOriginalFile = 1 << 16,

    /**
     Share the current PDF page as an image. For this option, page selection does not apply.

     When sharing a `PSPDFImageDocument`, the image is flattened is shared without embedded metadata.
     This reduces the image file size, but disallows further edits of embedded annotations.
     */
    PSPDFDocumentSharingOptionImage = 1 << 17,

    /**
     This option should be included to display an option to export a `PSPDFImageDocument` as an image with its annotations
     embedded with its metadata.

     For this option, page selection does not apply. This option is also ignored if the document being shared is not a `PSPDFImageDocument`.
     */
    PSPDFDocumentSharingOptionImageWithMetadata = 1 << 18,
}

Undocumented

  • The default option. Will share all available options via embedding annotations.

    Declaration

    Objective-C

    PSPDFDocumentSharingOptionNone = 0
  • Only the page set in pageIndex of PSPDFViewController.

    Declaration

    Objective-C

    PSPDFDocumentSharingOptionCurrentPageOnly = 1 << 0

    Swift

    static var currentPageOnly: PSPDFDocumentSharingOptions { get }
  • Let the user select a range of pages to share.

    Declaration

    Objective-C

    PSPDFDocumentSharingOptionPageRange = 1 << 1

    Swift

    static var pageRange: PSPDFDocumentSharingOptions { get }
  • Send the whole document.

    Declaration

    Objective-C

    PSPDFDocumentSharingOptionAllPages = 1 << 2

    Swift

    static var allPages: PSPDFDocumentSharingOptions { get }
  • Share all pages that contain annotations.

    Declaration

    Objective-C

    PSPDFDocumentSharingOptionAnnotatedPages = 1 << 4

    Swift

    static var annotatedPages: PSPDFDocumentSharingOptions { get }
  • Save annotations in the PDF.

    Embed annotations into the PDF.

    Warning

    When using this option for printing, no annotations may be printed. This is a result of internal limitations of the printing system on iOS.

    Declaration

    Objective-C

    PSPDFDocumentSharingOptionEmbedAnnotations = 1 << 8

    Swift

    static var embedAnnotations: PSPDFDocumentSharingOptions { get }
  • Render annotations into the PDF.

    Declaration

    Objective-C

    PSPDFDocumentSharingOptionFlattenAnnotations = 1 << 9

    Swift

    static var flattenAnnotations: PSPDFDocumentSharingOptions { get }
  • Save annotations + add summary.

    Declaration

    Objective-C

    PSPDFDocumentSharingOptionAnnotationsSummary = 1 << 10

    Swift

    static var annotationsSummary: PSPDFDocumentSharingOptions { get }
  • Remove all annotations.

    Declaration

    Objective-C

    PSPDFDocumentSharingOptionRemoveAnnotations = 1 << 11

    Swift

    static var removeAnnotations: PSPDFDocumentSharingOptions { get }
  • Render annotations into the PDF, remove annotations that are not printable.

    Declaration

    Objective-C

    PSPDFDocumentSharingOptionFlattenAnnotationsForPrint = 1 << 12

    Swift

    static var flattenAnnotationsForPrint: PSPDFDocumentSharingOptions { get }
  • Offer to use the original file for sharing. See originalFile in PSPDFDocument. For this option, neither page selection nor annotations apply.

    Note

    If the document isn’t backed by a file, then it is written to a file temporarily.

    Declaration

    Objective-C

    PSPDFDocumentSharingOptionOriginalFile = 1 << 16

    Swift

    static var originalFile: PSPDFDocumentSharingOptions { get }
  • Share the current PDF page as an image. For this option, page selection does not apply.

    When sharing a PSPDFImageDocument, the image is flattened is shared without embedded metadata. This reduces the image file size, but disallows further edits of embedded annotations.

    Declaration

    Objective-C

    PSPDFDocumentSharingOptionImage = 1 << 17

    Swift

    static var image: PSPDFDocumentSharingOptions { get }
  • This option should be included to display an option to export a PSPDFImageDocument as an image with its annotations embedded with its metadata.

    For this option, page selection does not apply. This option is also ignored if the document being shared is not a PSPDFImageDocument.

    Declaration

    Objective-C

    PSPDFDocumentSharingOptionImageWithMetadata = 1 << 18

    Swift

    static var imageWithMetadata: PSPDFDocumentSharingOptions { get }