@interface PSPDFDataContainerProvider : NSObject <PSPDFDataProviding>

An implementation of PSPDFDataProviding that operates on a single NSData.

This may be used to initialize PSPDFDocument with data.


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.


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.