Other Classes

The following classes are available globally.

  • Base classs for building a configuration object.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFBaseConfigurationBuilder : NSObject

    Swift

    class PSPDFBaseConfigurationBuilder : NSObject
  • A color patch represents a single patch of colors in the UI. It contains of one or multiple colors that should be grouped together.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFColorPatch : NSObject

    Swift

    class PSPDFColorPatch : NSObject
  • A color palette is a set of color patches that are grouped together based on a specific look or theme.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFColorPalette : NSObject

    Swift

    class PSPDFColorPalette : NSObject
  • The factory used to create color pickers. Subclass this to customize your color pickers.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFColorPickerFactory : NSObject

    Swift

    class PSPDFColorPickerFactory : NSObject
  • Manages document editing. Supports operations such as remove, move, rotate and add page.

    Note

    This class requires the Document Editor component to be enabled for your license.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFDocumentEditor : NSObject

    Swift

    class PSPDFDocumentEditor : NSObject
  • Undocumented

    Declaration

    Objective-C

    @interface PSPDFDocumentViewLayoutInvalidationContext : UICollectionViewLayoutInvalidationContext @end

    Swift

    class PSPDFDocumentViewLayoutInvalidationContext : UICollectionViewLayoutInvalidationContext
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PSPDFDownloadManager : NSObject
    
    PSPDF_EMPTY_INIT_UNAVAILABLE
    
    /// @name Configuration
    
    /// The maximum number of concurrent downloads. Defaults to 2.
    /// If `enableDynamicNumberOfConcurrentDownloads` is enabled, this property will change dynamically
    /// and must be considered readonly.
    @property (nonatomic) NSUInteger numberOfConcurrentDownloads;
    
    /// Enable this property to let `PSPDFDownloadManager` decide what the best number of concurrent downloads
    /// is depending on the network connection. Defaults to YES.
    @property (nonatomic) BOOL enableDynamicNumberOfConcurrentDownloads;
    
    /// The `PSPDFDownloadManager` delegate.
    @property (nonatomic, weak) id<PSPDFDownloadManagerDelegate> delegate;
    
    /// Controls if objects that are currently loading when the app moves to the background
    /// should be completed in the background. Defaults to YES. iOS only.
    @property (nonatomic) BOOL shouldFinishLoadingObjectsInBackground;
    
    /// @name Enqueueing and Dequeueing Objects
    
    /// See enqueueObject:atFront:. Enqueues the object at the end of the queue.
    - (void)enqueueObject:(id<PSPDFRemoteContentObject>)object;
    
    /// Enqueues an `PSPDFRemoteContentObject` for download. If the object is already downloading,
    /// nothing is enqueued. If the object has been downloaded previously and has failed, it will be
    /// removed from the failedObjects array and re-enqueued.
    ///
    /// @param object The object to enqueue.
    /// @param enqueueAtFront Set this to YES to add the object to the front of the queue.
    - (void)enqueueObject:(id<PSPDFRemoteContentObject>)object atFront:(BOOL)enqueueAtFront;
    
    /// Calls enqueueObject:atFont: multiple times. Enqueues the object at the end of the queue.
    ///
    /// @param objects need to implement the `PSPDFRemoteContentObject` protocol.
    - (void)enqueueObjects:(NSArray<id<PSPDFRemoteContentObject>> *)objects;
    
    /// Calls enqueueObject:atFont: multiple times.
    ///
    /// @param objects need to implement the `PSPDFRemoteContentObject` protocol.
    - (void)enqueueObjects:(NSArray<id<PSPDFRemoteContentObject>> *)objects atFront:(BOOL)enqueueAtFront;
    
    /// Cancels the download process for the given object.
    ///
    /// @param object The object to be cancelled.
    - (void)cancelObject:(id<PSPDFRemoteContentObject>)object;
    
    /// Calls `cancelObject:` for all objects in `pendingObjects`, `loadingObjects`, and `failedObjects`.
    - (void)cancelAllObjects;
    
    /// @name State
    
    /// The current reachability of the device.
    @property (nonatomic, readonly) PSPDFReachability reachability;
    
    /// Contains all objects waiting to be downloaded.
    @property (nonatomic, copy, readonly) NSArray<id<PSPDFRemoteContentObject>> *waitingObjects;
    
    /// Contains all currently loading objects.
    @property (nonatomic, copy, readonly) NSArray<id<PSPDFRemoteContentObject>> *loadingObjects;
    
    /// Contains all objects that have failed because of a network error and are scheduled for retry.
    @property (nonatomic, copy, readonly) NSArray<id<PSPDFRemoteContentObject>> *failedObjects;
    
    /// Helper that iterates loadingObjects, waitingObjects and failedObjects (in that order) and returns all matches.
    - (NSArray<id<PSPDFRemoteContentObject>> *)objectsPassingTest:(BOOL (^)(id<PSPDFRemoteContentObject> obj, NSUInteger index, BOOL *stop))predicate;
    
    /// Checks if the given object is currently handled by the download manager.
    ///
    /// @param object The object.
    /// @return YES if the download manager handles the object, that is if it is either pending, loading or failed.
    - (BOOL)handlesObject:(id<PSPDFRemoteContentObject>)object;
    
    /// Checks and returns the current state of a given object. If the object has never been enqueued,
    /// `PSPDFDownloadManagerObjectStateNotHandled` will be returned.
    ///
    /// @param object The object.
    /// @return The state of the object.
    - (PSPDFDownloadManagerObjectState)stateForObject:(id<PSPDFRemoteContentObject>)object;
    
    @end

    Swift

    class PSPDFDownloadManager : NSObject
  • An abstract base class for model objects, using reflection to provide sensible default behaviors.

    The default implementations of , -hash, and -isEqual: make use of the +propertyKeys method.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFModel : NSObject <NSCopying>

    Swift

    class PSPDFModel : NSObject, NSCopying
  • Create, merge or modify PDF documents. Can also flatten annotation data.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFProcessor : NSObject

    Swift

    class PSPDFProcessor : NSObject
  • Operation that converts many file formats to PDF. Needs to be executed from a thread. Requires the PSPDFFeatureMaskPDFCreation feature flag.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFConversionOperation : NSOperation

    Swift

    class PSPDFConversionOperation : Operation
  • Represents an item that can be added to either a new page or an existing page. The item can either be a UIImage which will then be compressed as a JPEG using imageJpegCompressionQuality or a NSURL that points to a JPEG or PDF file.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFProcessorItem : NSObject

    Swift

    class PSPDFProcessorItem : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PSPDFRemoteFileObject : NSObject<PSPDFRemoteContentObject>
    
    PSPDF_EMPTY_INIT_UNAVAILABLE
    
    /// Designated initializer.
    - (instancetype)initWithRemoteURL:(NSURL *)remoteURL targetURL:(NSURL *)targetFileURL fileManager:(id<PSPDFFileManager>)fileManager NS_DESIGNATED_INITIALIZER;
    
    /// The remote URL to fetch the content from.
    @property (nonatomic, copy, readonly) NSURL *remoteURL;
    @property (nonatomic, copy, readonly) NSURL *targetURL;
    
    /// @name PSPDFRemoteContentObject
    
    /// The remote content of the object. This property is managed by `PSPDFDownloadManager`.
    @property (nonatomic, nullable) NSURL *remoteContent;
    
    /// The loading state of the object. This property is managed by `PSPDFDownloadManager`.
    @property (nonatomic, getter=isLoadingRemoteContent) BOOL loadingRemoteContent;
    
    /// The download progress of the object. Only meaningful if `loadingRemoteContent` is YES.
    /// This property is managed by `PSPDFDownloadManager`.
    @property (nonatomic) CGFloat remoteContentProgress;
    
    /// The remote content error of the object. This property is managed by `PSPDFDownloadManager`.
    @property (nonatomic, nullable) NSError *remoteContentError;
    
    /// The completion block.
    @property (nonatomic, copy, nullable) void (^completionBlock)(id<PSPDFRemoteContentObject> remoteObject);
    
    @end

    Swift

    class PSPDFRemoteFileObject : NSObject, PSPDFRemoteContentObject
  • Represents a single HUD item.

    Warning

    Only use this class on the main thread.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFStatusHUDItem : NSObject

    Swift

    class PSPDFStatusHUDItem : NSObject
  • Status HUD view that represents a given status HUD item.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFStatusHUDView : UIView

    Swift

    class PSPDFStatusHUDView : UIView
  • Layout attributes for the thubmnail collection view.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFThumbnailFlowLayoutAttributes : UICollectionViewLayoutAttributes

    Swift

    class PSPDFThumbnailFlowLayoutAttributes : UICollectionViewLayoutAttributes
  • Undocumented

    Declaration

    Objective-C

    @interface PSPDFVersionDummy : NSObject
    @end

    Swift

    class PSPDFVersionDummy