<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 11.0.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PDFKit",
  "identifier" : "/documentation/PDFKit/PDFAnnotationKey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "PDFKit"
    ],
    "preciseIdentifier" : "c:@T@PDFAnnotationKey"
  },
  "title" : "PDFAnnotationKey"
}
-->

# PDFAnnotationKey

Keys for setting properties of annotations.

```
struct PDFAnnotationKey
```

## Topics

### Configuring General Properties

[`PDFAnnotationKeyContents`](/documentation/PDFKit/PDFAnnotationKey/contents)

The text that the annotation displays or represents.

[`PDFAnnotationKeyDate`](/documentation/PDFKit/PDFAnnotationKey/date)

The date, or string representation of a date, of the annotation’s most recent modification.

[`PDFAnnotationKeyFlags`](/documentation/PDFKit/PDFAnnotationKey/flags)

An integer value that specifies flags for the annotation.

[`PDFAnnotationKeyName`](/documentation/PDFKit/PDFAnnotationKey/name)

A string that uniquely identifies the annotation among all annotations on the same page.

[`PDFAnnotationKeyPage`](/documentation/PDFKit/PDFAnnotationKey/page)

A dictionary or PDF page object that includes the annotation.

[`PDFAnnotationKeyParent`](/documentation/PDFKit/PDFAnnotationKey/parent)

A dictionary or annotation object that a pop-up or widget belongs to.

[`PDFAnnotationKeyQuadPoints`](/documentation/PDFKit/PDFAnnotationKey/quadPoints)

An array of floating point values that specifies a rectangular region of a page.

[`PDFAnnotationKeyRect`](/documentation/PDFKit/PDFAnnotationKey/rect)

The rectangle that the annotation occupies on the page, in page-space coordinates.

[`PDFAnnotationKeySubtype`](/documentation/PDFKit/PDFAnnotationKey/subtype)

The type of annotation that the entries in a dictionary describe.

[`PDFAnnotationKeyTextLabel`](/documentation/PDFKit/PDFAnnotationKey/textLabel)

A string that represents the title of the annotation.

### Configuring Annotation Appearance

[`PDFAnnotationKeyAppearanceDictionary`](/documentation/PDFKit/PDFAnnotationKey/appearanceDictionary)

A dictionary that contains properties for controlling the annotation’s visual appearance.

[`PDFAnnotationKeyAppearanceState`](/documentation/PDFKit/PDFAnnotationKey/appearanceState)

A string that specifies the appearance stream for the annotation.

[`PDFAnnotationKeyBorder`](/documentation/PDFKit/PDFAnnotationKey/border)

An array of integers or border objects that describes the border of the annotation.

[`PDFAnnotationKeyBorderStyle`](/documentation/PDFKit/PDFAnnotationKey/borderStyle)

A dictionary that contains the properties of the annotation’s border.

[`PDFAnnotationKeyColor`](/documentation/PDFKit/PDFAnnotationKey/color)

An array of floats or a color object that specifies the annotation’s color.

[`PDFAnnotationKeyDefaultAppearance`](/documentation/PDFKit/PDFAnnotationKey/defaultAppearance)

A string value a free text annotation uses to format the text.

[`PDFAnnotationKeyHighlightingMode`](/documentation/PDFKit/PDFAnnotationKey/highlightingMode)

A string value that defines the way an annotation highlights when the user activates it, such as when clicking or tapping a link.

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

[`PDFAnnotationKeyIconName`](/documentation/PDFKit/PDFAnnotationKey/iconName)

A string value that specifies the name of an icon for a text or stamp annotation.

[`PDFAnnotationKeyInteriorColor`](/documentation/PDFKit/PDFAnnotationKey/interiorColor)

An array of floating point values or a PDF color object that annotations use to fill interior space, such as line endings, squares, or circles.

[`PDFAnnotationKeyQuadding`](/documentation/PDFKit/PDFAnnotationKey/quadding)

An integer value that specifies left, right, or center justification.

### Configuring Line Properties

[`PDFAnnotationKeyLineEndingStyles`](/documentation/PDFKit/PDFAnnotationKey/lineEndingStyles)

An array of string values that specifies the styles to use for the ends of lines.

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

The following constants specify the available line ending styles.

[`PDFAnnotationKeyLinePoints`](/documentation/PDFKit/PDFAnnotationKey/linePoints)

An array of floating point values that specifies the starting and ending points, in page-space coordinates, of a line.

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

### Configuring Pop-Up Annotations

[`PDFAnnotationKeyPopup`](/documentation/PDFKit/PDFAnnotationKey/popup)

A dictionary or annotation object that specifies the annotation to pop up for text entry or editing.

[`PDFAnnotationKeyOpen`](/documentation/PDFKit/PDFAnnotationKey/open)

A Boolean value that specifies whether the pop-up is in an opened state, showing its text content, or in a closed state and showing an icon.

### Configuring Widget Annotations

[`PDFAnnotationKeyWidgetAppearanceDictionary`](/documentation/PDFKit/PDFAnnotationKey/widgetAppearanceDictionary)

A dictionary or appearance characteristic object that contains properties for controlling the widget’s visual appearance.

[`PDFAnnotationKeyWidgetBackgroundColor`](/documentation/PDFKit/PDFAnnotationKey/widgetBackgroundColor)

An array of floating point values or a PDF color object that specifies the widget’s background color.

[`PDFAnnotationKeyWidgetBorderColor`](/documentation/PDFKit/PDFAnnotationKey/widgetBorderColor)

An array of floating point values or a PDF color object that specifies the widget’s border color.

[`PDFAnnotationKeyWidgetCaption`](/documentation/PDFKit/PDFAnnotationKey/widgetCaption)

A string that a push button widget displays when it isn’t in a pressed state.

[`PDFAnnotationKeyWidgetDefaultValue`](/documentation/PDFKit/PDFAnnotationKey/widgetDefaultValue)

A default value for the widget.

[`PDFAnnotationKeyWidgetDownCaption`](/documentation/PDFKit/PDFAnnotationKey/widgetDownCaption)

A string that a push button widgets displays when it’s in a pressed state.

[`PDFAnnotationKeyWidgetFieldFlags`](/documentation/PDFKit/PDFAnnotationKey/widgetFieldFlags)

An integer value that specifies flags for a widget.

[`PDFAnnotationKeyWidgetFieldType`](/documentation/PDFKit/PDFAnnotationKey/widgetFieldType)

A string that specifies the type of widget, such as button, checkbox, or signature field.

[`PDFAnnotationKeyWidgetMaxLen`](/documentation/PDFKit/PDFAnnotationKey/widgetMaxLen)

An integer value that specifies the maximum length of a text field, in characters.

[`PDFAnnotationKeyWidgetOptions`](/documentation/PDFKit/PDFAnnotationKey/widgetOptions)

An array that specifies the options to present in radio buttons or choice lists.

[`PDFAnnotationKeyWidgetRolloverCaption`](/documentation/PDFKit/PDFAnnotationKey/widgetRolloverCaption)

A string that push button widgets display when the pointer is over the button, but not clicking it.

[`PDFAnnotationKeyWidgetRotation`](/documentation/PDFKit/PDFAnnotationKey/widgetRotation)

An integer value that specifies the rotation of the widget.

[`PDFAnnotationKeyWidgetTextLabelUI`](/documentation/PDFKit/PDFAnnotationKey/widgetTextLabelUI)

A user-visible alternative field name that identifies the widget, typically for accessibility purposes.

[`PDFAnnotationKeyWidgetValue`](/documentation/PDFKit/PDFAnnotationKey/widgetValue)

The widget’s value, typically for text and choice widgets.

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

### Configuring Actions

[`PDFAnnotationKeyDestination`](/documentation/PDFKit/PDFAnnotationKey/destination)

An array, name, or string that represents the destination of an action.

[`PDFAnnotationKeyAction`](/documentation/PDFKit/PDFAnnotationKey/action)

A dictionary or PDF action object that represents an action to take, such as when the user clicks or taps a button.

[`PDFAnnotationKeyAdditionalActions`](/documentation/PDFKit/PDFAnnotationKey/additionalActions)

A dictionary or PDF action object that represents additional actions an annotation can perform, such as when it receives input focus.

### Configuring Ink Annotations

[`PDFAnnotationKeyInklist`](/documentation/PDFKit/PDFAnnotationKey/inklist)

An array of arrays that represents stroked paths.

### Creating an Annotation Key

[`init(rawValue:)`](/documentation/PDFKit/PDFAnnotationKey/init(rawValue:))

Creates an annotation key using the specified raw string value.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

---

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)