<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.2.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGPDFDocument/isEncrypted",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Graphics",
      "CoreGraphics"
    ],
    "preciseIdentifier" : "c:@F@CGPDFDocumentIsEncrypted"
  },
  "title" : "isEncrypted"
}
-->

# isEncrypted

Returns whether the specified PDF file is encrypted.

```
var isEncrypted: Bool { get }
```

## Discussion

If the document is encrypted, a password must be supplied before certain operations are enabled. For more information, see [`unlockWithPassword(_:)`](/documentation/CoreGraphics/CGPDFDocument/unlockWithPassword(_:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)