---
title: PDFAnnotation
framework: pdfkit
role: symbol
role_heading: Class
path: pdfkit/pdfannotation
---

# PDFAnnotation

An annotation in a PDF document.

## Declaration

```swift
class PDFAnnotation
```

## Mentioned in

Adding Custom Graphics to a PDF Adding Widgets to a PDF Document

## Overview

Overview In addition to its primary textual content, a PDF file can contain annotations that represent links, form elements, highlighting circles, textual notes, and so on. Each annotation has a specific location on a page and may offer interactivity with the user.

## Topics

### Creating an Annotation

- [init(bounds:forType:withProperties:)](pdfkit/pdfannotation/init(bounds:fortype:withproperties:).md)
- [PDFAnnotationSubtype](pdfkit/pdfannotationsubtype.md)

### Accessing Information About an Annotation

- [page](pdfkit/pdfannotation/page.md)
- [modificationDate](pdfkit/pdfannotation/modificationdate.md)
- [userName](pdfkit/pdfannotation/username.md)
- [type](pdfkit/pdfannotation/type.md)
- [action](pdfkit/pdfannotation/action.md)
- [PDFAction](pdfkit/pdfaction.md)
- [PDFDestination](pdfkit/pdfdestination.md)

### Managing Annotation Drawing and Output

- [draw(with:in:)](pdfkit/pdfannotation/draw(with:in:).md)
- [shouldDisplay](pdfkit/pdfannotation/shoulddisplay.md)
- [shouldPrint](pdfkit/pdfannotation/shouldprint.md)

### Modifying Annotation Attributes

- [annotationKeyValues](pdfkit/pdfannotation/annotationkeyvalues.md)
- [value(forAnnotationKey:)](pdfkit/pdfannotation/value(forannotationkey:).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)

### Managing Annotation Display Characteristics

- [alignment](pdfkit/pdfannotation/alignment.md)
- [bounds](pdfkit/pdfannotation/bounds.md)
- [contents](pdfkit/pdfannotation/contents.md)
- [font](pdfkit/pdfannotation/font.md)
- [fontColor](pdfkit/pdfannotation/fontcolor.md)
- [border](pdfkit/pdfannotation/border.md)
- [PDFBorder](pdfkit/pdfborder.md)
- [isHighlighted](pdfkit/pdfannotation/ishighlighted.md)
- [color](pdfkit/pdfannotation/color.md)
- [hasAppearanceStream](pdfkit/pdfannotation/hasappearancestream.md)

### Configuring Shape Annotations

- [interiorColor](pdfkit/pdfannotation/interiorcolor.md)

### Configuring Line Annotations

- [startPoint](pdfkit/pdfannotation/startpoint.md)
- [endPoint](pdfkit/pdfannotation/endpoint.md)
- [startLineStyle](pdfkit/pdfannotation/startlinestyle.md)
- [endLineStyle](pdfkit/pdfannotation/endlinestyle.md)
- [lineStyle(fromName:)](pdfkit/pdfannotation/linestyle(fromname:).md)
- [name(for:)](pdfkit/pdfannotation/name(for:).md)

### Configuring Link Annotations

- [destination](pdfkit/pdfannotation/destination.md)
- [url](pdfkit/pdfannotation/url.md)

### Configuring Text Annotations

- [iconType](pdfkit/pdfannotation/icontype.md)
- [PDFTextAnnotationIconType](pdfkit/pdftextannotationicontype.md)
- [PDFAnnotationTextIconType](pdfkit/pdfannotationtexticontype.md)

### Configuring Pop-Up Annotations

- [popup](pdfkit/pdfannotation/popup.md)
- [isOpen](pdfkit/pdfannotation/isopen.md)

### Configuring Text Markup Annotations

- [markupType](pdfkit/pdfannotation/markuptype.md)
- [PDFMarkupType](pdfkit/pdfmarkuptype.md)
- [quadrilateralPoints](pdfkit/pdfannotation/quadrilateralpoints.md)

### Configuring Widget Annotations

- [widgetFieldType](pdfkit/pdfannotation/widgetfieldtype.md)
- [widgetStringValue](pdfkit/pdfannotation/widgetstringvalue.md)
- [widgetDefaultStringValue](pdfkit/pdfannotation/widgetdefaultstringvalue.md)
- [fieldName](pdfkit/pdfannotation/fieldname.md)
- [backgroundColor](pdfkit/pdfannotation/backgroundcolor.md)
- [isReadOnly](pdfkit/pdfannotation/isreadonly.md)
- [PDFWidgetControlType](pdfkit/pdfwidgetcontroltype.md)
- [PDFAppearanceCharacteristics](pdfkit/pdfappearancecharacteristics.md)

### Configuring Text Widget Annotations

- [isMultiline](pdfkit/pdfannotation/ismultiline.md)
- [isPasswordField](pdfkit/pdfannotation/ispasswordfield.md)
- [maximumLength](pdfkit/pdfannotation/maximumlength.md)
- [hasComb](pdfkit/pdfannotation/hascomb.md)

### Configuring Button Widget Annotations

- [widgetControlType](pdfkit/pdfannotation/widgetcontroltype.md)
- [buttonWidgetState](pdfkit/pdfannotation/buttonwidgetstate.md)
- [PDFWidgetCellState](pdfkit/pdfwidgetcellstate.md)
- [buttonWidgetStateString](pdfkit/pdfannotation/buttonwidgetstatestring.md)
- [caption](pdfkit/pdfannotation/caption.md)
- [allowsToggleToOff](pdfkit/pdfannotation/allowstoggletooff.md)
- [radiosInUnison](pdfkit/pdfannotation/radiosinunison.md)

### Configuring Choice Widget Annotations

- [choices](pdfkit/pdfannotation/choices.md)
- [isListChoice](pdfkit/pdfannotation/islistchoice.md)
- [values](pdfkit/pdfannotation/values.md)

### Configuring Ink Annotations

- [paths](pdfkit/pdfannotation/paths.md)
- [add(_:)](pdfkit/pdfannotation/add(_:).md)
- [remove(_:)](pdfkit/pdfannotation/remove(_:).md)

### Configuring Stamp Annotations

- [stampName](pdfkit/pdfannotation/stampname.md)

### Deprecated

- [Deprecated Symbols](pdfkit/deprecated-symbols.md)

### Instance Properties

- [isActivatableTextField](pdfkit/pdfannotation/isactivatabletextfield.md)

### Initializers

- [init(coder:)](pdfkit/pdfannotation/init(coder:).md)
- [init(dictionary:for:)](pdfkit/pdfannotation/init(dictionary:for:).md)

### Default Implementations

- [PDFAnnotation Implementations](pdfkit/pdfannotation/pdfannotation-implementations.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [PDFAnnotationButtonWidget](pdfkit/pdfannotationbuttonwidget.md)
- [PDFAnnotationChoiceWidget](pdfkit/pdfannotationchoicewidget.md)
- [PDFAnnotationCircle](pdfkit/pdfannotationcircle.md)
- [PDFAnnotationFreeText](pdfkit/pdfannotationfreetext.md)
- [PDFAnnotationInk](pdfkit/pdfannotationink.md)
- [PDFAnnotationLine](pdfkit/pdfannotationline.md)
- [PDFAnnotationLink](pdfkit/pdfannotationlink.md)
- [PDFAnnotationMarkup](pdfkit/pdfannotationmarkup.md)
- [PDFAnnotationPopup](pdfkit/pdfannotationpopup.md)
- [PDFAnnotationSquare](pdfkit/pdfannotationsquare.md)
- [PDFAnnotationStamp](pdfkit/pdfannotationstamp.md)
- [PDFAnnotationText](pdfkit/pdfannotationtext.md)
- [PDFAnnotationTextWidget](pdfkit/pdfannotationtextwidget.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Annotations

- [Adding Widgets to a PDF Document](pdfkit/adding-widgets-to-a-pdf-document.md)
- [Adding Custom Graphics to a PDF](pdfkit/adding-custom-graphics-to-a-pdf.md)
- [Custom Graphics](pdfkit/custom-graphics.md)
- [PDF Widgets](pdfkit/pdf-widgets.md)
