PSPDFFileDataProvider


@interface PSPDFFileDataProvider : NSObject <PSPDFFileDataProviding>

An implementation of PSPDFDataProviding that acts upon a file.

  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFFileDataProvider : NSObject <PSPDFFileDataProviding>
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFFileDataProvider : NSObject <PSPDFFileDataProviding>
  • 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 affects the UID but otherwise has no effect. This ought to be set to fileURL.URLByDeletingLastPathComponent for compatibility with -[PSPDFDocument initWithURL:] and set appropriately when migrating from the old PSPDFDocument initializers that specified a baseURL (removed in PSPDFKit 7.0.0 for iOS).

    progress

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

    Return Value

    A new file provider.

  • 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

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

    Swift

    convenience init(fileURL: URL)
  • The baseURL if provided during initialization.

    Declaration

    Objective-C

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

    Swift

    var baseURL: URL? { get }