PSPDFDataContainerProvider


@interface PSPDFDataContainerProvider : NSObject <PSPDFDataProviding>

An implementation of PSPDFDataProviding that operates on a single NSData.

This may be used to initialize PSPDFDocument with data.

Warning

You might want to set a custom UID otherwise the UID will be calculated from a part of the PDF contents, which might be the same if the files are similar.

Note

When using this data provider, PSPDFKit is unable to automatically save annotation changes back into the PDF. Keep in mind that iOS is an environment without virtual memory. Loading a large PDF will simply get your app killed by the iOS watchdog while you try to allocate more memory than is available.

If you use NSData because of encryption, look into PSPDFAESCryptoDataProvider or a custom implementation of PSPDFDataProviding instead for a way to dynamically decrypt the needed portions of the PDF.

  • Unavailable

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Initializes a PSPDFDataContainerProvider with the given data.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithData:(nonnull NSData *)data;

    Swift

    init(data: Data)

    Parameters

    data

    A data blob containing PDF data.

    Return Value

    A new data provider.