---
title: "value(forAnnotationKey:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfannotation/value(forannotationkey:)"
---

# value(forAnnotationKey:)

Returns a deep copy of the key-value pairs of properties for the specified key.

## Declaration

```swift
func value(forAnnotationKey key: PDFAnnotationKey) -> Any?
```

## Parameters

- `key`: A doc://com.apple.pdfkit/documentation/PDFKit/PDFAnnotationKey or appropriate string from the Adobe PDF Specification.

## See Also

### Modifying Annotation Attributes

- [annotationKeyValues](pdfkit/pdfannotation/annotationkeyvalues.md)
- [setValue(_:forAnnotationKey:)](pdfkit/pdfannotation/setvalue(_:forannotationkey:).md)
- [setBoolean(_:forAnnotationKey:)](pdfkit/pdfannotation/setboolean(_:forannotationkey:).md)
- [setRect(_:forAnnotationKey:)](pdfkit/pdfannotation/setrect(_:forannotationkey:).md)
- [removeValue(forAnnotationKey:)](pdfkit/pdfannotation/removevalue(forannotationkey:).md)
- [PDFAnnotationKey](pdfkit/pdfannotationkey.md)
