<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PDFKit",
  "identifier" : "/documentation/PDFKit/PDFDocument/documentAttributes",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "PDFKit"
    ],
    "preciseIdentifier" : "c:objc(cs)PDFDocument(py)documentAttributes"
  },
  "title" : "documentAttributes"
}
-->

# documentAttributes

A dictionary of document metadata.

```
var documentAttributes: [AnyHashable : Any]? { get set }
```

## Return Value

The dictionary of document metadata. The dictionary may be empty, or only some of the keys may have associated values.

## Discussion

Metadata is optional for PDF documents.

## See Also

[`PDFDocumentAttribute`](/documentation/PDFKit/PDFDocumentAttribute)

A structure that specifies document attributes.



---

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)