PSPDFFileDataProvider


@interface PSPDFFileDataProvider : NSObject <PSPDFDataProvider>

A PSPDFDataProvider that acts upon a file.

  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFFileDataProvider : NSObject <PSPDFDataProvider>
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFFileDataProvider : NSObject <PSPDFDataProvider>
  • Initializes a PSPDFFileDataProvider with the given fileURL.

    Note

    If you are expecting to encounter symlinks or alias files, you need to resolve those using NSURL APIs before passing the URLs to PSPDFFileDataProvider. PSPDFFileDataProvider won’t automatically resolve them for performance reasons.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFileURL:(nonnull NSURL *)fileURL
                                    baseURL:(nullable NSURL *)baseURL
                                   progress:(nullable NSProgress *)progress;

    Swift

    init(fileURL: URL, baseURL: URL?, progress: Progress?)

    Parameters

    fileURL

    Needs to be a file URL pointing to a PDF file on the filesystem.

    baseURL

    This should mimic the PSPDFDocument value and is important for UID generation.

    progress

    An optionall NSProgress instance that indicates progress until the file at fileURL can be accessed.

    Return Value

    The file provider insteance.

  • See

    initWithFileURL:baseURL:progress:

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFileURL:(nonnull NSURL *)fileURL
                                    baseURL:(nullable NSURL *)baseURL;

    Swift

    convenience init(fileURL: URL, baseURL: URL?)
  • See

    initWithFileURL:baseURL:progress:

    Declaration

    Objective-C

    - (nullable instancetype)initWithFileURL:(nonnull NSURL *)fileURL;

    Swift

    convenience init?(fileURL: URL)
  • The fileURL that is being used by this PSPDFFileDataProvider.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSURL *_Nonnull fileURL;

    Swift

    var fileURL: URL { get }
  • The baseURL if provided during initialization.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSURL *baseURL;

    Swift

    var baseURL: URL? { get }