<!--
{
  "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

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

The text that the annotation displays or represents.

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

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

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

An integer value that specifies flags for the annotation.

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

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

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

A dictionary or PDF page object that includes the annotation.

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

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

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

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

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

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

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

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

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

A string that represents the title of the annotation.

### Configuring Annotation Appearance

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

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

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

A string that specifies the appearance stream for the annotation.

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

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

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

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

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

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

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

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

[`highlightingMode`](/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)

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

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

[`interiorColor`](/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.

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

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

### Configuring Line Properties

[`lineEndingStyles`](/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.

[`linePoints`](/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

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

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

[`open`](/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

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

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

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

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

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

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

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

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

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

A default value for the widget.

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

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

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

An integer value that specifies flags for a widget.

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

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

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

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

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

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

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

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

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

An integer value that specifies the rotation of the widget.

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

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

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

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

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

### Configuring Actions

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

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

[`action`](/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.

[`additionalActions`](/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

[`inklist`](/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.



---

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)