PSPDFFileDataProviding

@protocol PSPDFFileDataProviding <PSPDFDataProviding>

A more specialized protocol for data providers backed by local files.

  • The local file URL that the data provider reads from.

    This can only be nil when the data provider supplies a progress and that progress is not completed. When implementing a custom class that conforms to PSPDFDileDataProviding, where the value of this property may change over time — maybe because the file has become available after loading from the network, moved on disk, or deleted — it is your responsibility to post the KVO notifications. The simplest way to achieve this is by re-declaring the property as readwrite, and always using the (synthesized) setter.

    Warning

    Changing the value of this property without posting the appropriate KVO notifications leads to undefined behavior in PSPDFDocument.

    Declaration

    Objective-C

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

    Swift

    var fileURL: URL? { get }