Function

CGPDFDocumentIsUnlocked

Returns whether the specified PDF document is currently unlocked.

Declaration

bool CGPDFDocumentIsUnlocked(CGPDFDocumentRef document);

Parameters

document

A PDF document.

Return Value

A Boolean that, if YES, indicates that the document is not locked. If the value is NO, the document is locked.

Discussion

There are two possible reasons why a PDF document is unlocked:

See Also

Managing Encryption

CGPDFDocumentAllowsCopying

Returns whether the specified PDF document allows copying.

CGPDFDocumentAllowsPrinting

Returns whether a PDF document allows printing.

CGPDFDocumentIsEncrypted

Returns whether the specified PDF file is encrypted.

CGPDFDocumentUnlockWithPassword

Unlocks an encrypted PDF document when a valid password is supplied.