Attempts to unlock an encrypted document.
- iOS 11.0+
- macOS 10.4+
The password to unlock an encrypted document (you cannot lock an unlocked PDF document by using an incorrect password).
true if the specified password unlocks the document,
If the password is correct, this method returns
true, and a
PDFDocument notification is sent. Once unlocked, you cannot use this function to relock the document.
If you attempt to unlock an already unlocked document, one of the following occurs:
If the document is unlocked with full owner permissions,
unlockdoes nothing and returns
true. The password string is ignored.
If the document is unlocked with only user permissions,
unlockattempts to obtain full owner permissions with the password string. If the string fails, the document maintains its user permissions. In either case, this method returns