---
title: isUnlocked
framework: coregraphics
role: symbol
role_heading: Instance Property
path: coregraphics/cgpdfdocument/isunlocked
---

# isUnlocked

Returns whether the specified PDF document is currently unlocked.

## Declaration

```swift
var isUnlocked: Bool { get }
```

## Discussion

Discussion There are two possible reasons why a PDF document is unlocked: The document is not encrypted. The document is encrypted, and a valid password was previously specified using unlockWithPassword(_:).

## See Also

### Working with an Encrypted PDF Document

- [isEncrypted](coregraphics/cgpdfdocument/isencrypted.md)
- [allowsCopying](coregraphics/cgpdfdocument/allowscopying.md)
- [allowsPrinting](coregraphics/cgpdfdocument/allowsprinting.md)
- [unlockWithPassword(_:)](coregraphics/cgpdfdocument/unlockwithpassword(_:).md)
