Function

CGPDFDocumentIsEncrypted

Returns whether the specified PDF file is encrypted.

Declaration

bool CGPDFDocumentIsEncrypted(CGPDFDocumentRef document);

Parameters

document

A PDF document.

Return Value

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

Discussion

If the document is encrypted, a password must be supplied before certain operations are enabled. For more information, see CGPDFDocumentUnlockWithPassword.

See Also

Managing Encryption

CGPDFDocumentAllowsCopying

Returns whether the specified PDF document allows copying.

CGPDFDocumentAllowsPrinting

Returns whether a PDF document allows printing.

CGPDFDocumentIsUnlocked

Returns whether the specified PDF document is currently unlocked.

CGPDFDocumentUnlockWithPassword

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