PSPDFDocumentSharingConfiguration


@interface PSPDFDocumentSharingConfiguration
    : PSPDFBaseConfiguration <PSPDFDocumentSharingConfigurationBuilder *>

A PSPDFDocumentSharingConfiguration instance configures how the sharing view controller behaves, and what options it lets the user customize.

  • Returns a configuration suitable for the given destination.

    File Format Options

    The Messages, Email, Other Application, Export, and Activity destinations, by default, have the following file format options enabled:

    PSPDFDocumentSharingFileFormatOptionPDF | PSPDFDocumentSharingFileFormatOptionImage | PSPDFDocumentSharingFileFormatOptionOriginal
    

    The Print destination has only one file format option enabled by default:

    PSPDFDocumentSharingFileFormatOptionPDF
    

    Note

    Please keep in mind that in the context of the Printing destination, the file format option is largely irrelevant.

    Page Selection Options

    Every destination has the following pages options selected by default:

    PSPDFDocumentSharingPagesOptionCurrent | PSPDFDocumentSharingPagesOptionRange | PSPDFDocumentSharingPagesOptionAll | PSPDFDocumentSharingPagesOptionAnnotated
    

    Annotation Options

    The Messages, Email, Other Application, Export, and Activity destinations, by default, have the following annotation options enabled:

    PSPDFDocumentSharingAnnotationOptionEmbed | PSPDFDocumentSharingAnnotationOptionFlatten | PSPDFDocumentSharingAnnotationOptionRemove | PSPDFDocumentSharingAnnotationOptionSummary
    

    The Print destination has by default the following annotation options enabled:

    PSPDFDocumentSharingAnnotationOptionFlattenForPrint | PSPDFDocumentSharingAnnotationOptionRemove | PSPDFDocumentSharingAnnotationOptionSummary
    

    Declaration

    Objective-C

    + (nonnull PSPDFDocumentSharingConfiguration *)
    defaultConfigurationForDestination:
        (nonnull PSPDFDocumentSharingDestination)destination;

    Swift

    class func defaultConfiguration(forDestination destination: PSPDFDocumentSharingDestination) -> PSPDFDocumentSharingConfiguration
  • The file formats the documents should be allowed to be shared in.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFDocumentSharingFileFormatOptions fileFormatOptions;

    Swift

    var fileFormatOptions: PSPDFDocumentSharingFileFormatOptions { get }
  • Which pages from the documents should be shared.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFDocumentSharingPagesOptions pageSelectionOptions;

    Swift

    var pageSelectionOptions: PSPDFDocumentSharingPagesOptions { get }
  • How the annotations should be processed when sharing the documents.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFDocumentSharingAnnotationOptions annotationOptions;

    Swift

    var annotationOptions: PSPDFDocumentSharingAnnotationOptions { get }
  • The destination where the documents are going to be shared to.

    This value can be updated. When setting this property, the new value is required to be a member of availableDestinations.

    Setting this property also automatically updates the sharing options property to reflect the default values for the given destination.

    Warning

    If you wish to modify the sharing options for a given destination, do so before setting the destination.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFDocumentSharingDestination _Nonnull destination;

    Swift

    var destination: PSPDFDocumentSharingDestination { get }
  • The print configuration to apply when sharing via the .print destination. Defaults to nil.

    Note

    Due to API limitations, this is not used when printing is invoked via the .activity destination.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFPrintConfiguration *_Nonnull printConfiguration;

    Swift

    var printConfiguration: PSPDFPrintConfiguration { get }
  • Used for the activity action when the UIActivityViewController is displayed. Defaults to PSPDFActivityTypeOpenIn.

    Accepts both preprovided types as UIActivityType and UIActivity subclasses.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSArray *_Nonnull applicationActivities;

    Swift

    var applicationActivities: [Any] { get }
  • Used for the activity action when the UIActivityViewController is displayed.

    Defaults to UIActivityTypeCopyToPasteboard, UIActivityTypeAssignToContact, UIActivityTypePostToFacebook, UIActivityTypePostToTwitter, UIActivityTypePostToWeibo.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic)
        NSArray<UIActivityType> *_Nonnull excludedActivityTypes;

    Swift

    var excludedActivityTypes: [UIActivity.ActivityType] { get }