Search code examples
objective-cpspdfkit

PSPDFKit give error `documentRef is nil , cannot get pageRef`


How would i know file document is corrupt or cannot be loaded in PSPDFKit?

How delegate method should i implement in PSPDFKit to know document is corrupt or cannot be loaded?

The problem is file document does exist?? but don't know is file corrupt or not.

If i know then could download new file document if its corrupt.

Thanks you all !!!!!!


Solution

  • this is the main developer of PSPDFKit.

    You can use the [document.isValid][1] property to determine if the document source is valid or not.