---
title: PDFAnnotationTextWidget
framework: pdfkit
role: symbol
role_heading: Class
path: pdfkit/pdfannotationtextwidget
---

# PDFAnnotationTextWidget

A PDFAnnotationTextWidget object allows you to manage the appearance and content of text fields.

## Declaration

```swift
class PDFAnnotationTextWidget
```

## Overview

Overview PDFAnnotationTextWidget objects support interactive forms in a PDF document. This object is comparable to an editable NSTextField in Cocoa or an edit text view in Carbon.

## Topics

### Working with Annotation Strings

- [stringValue()](pdfkit/pdfannotationtextwidget/stringvalue().md)
- [setStringValue(_:)](pdfkit/pdfannotationtextwidget/setstringvalue(_:).md)
- [maximumLength()](pdfkit/pdfannotationtextwidget/maximumlength().md)
- [setMaximumLength(_:)](pdfkit/pdfannotationtextwidget/setmaximumlength(_:).md)

### Managing the Font and Font Color

- [font()](pdfkit/pdfannotationtextwidget/font().md)
- [setFont(_:)](pdfkit/pdfannotationtextwidget/setfont(_:).md)
- [fontColor()](pdfkit/pdfannotationtextwidget/fontcolor().md)
- [setFontColor(_:)](pdfkit/pdfannotationtextwidget/setfontcolor(_:).md)

### Managing Background Color, Alignment, and Rotation

- [backgroundColor()](pdfkit/pdfannotationtextwidget/backgroundcolor().md)
- [setBackgroundColor(_:)](pdfkit/pdfannotationtextwidget/setbackgroundcolor(_:).md)
- [alignment()](pdfkit/pdfannotationtextwidget/alignment().md)
- [setAlignment(_:)](pdfkit/pdfannotationtextwidget/setalignment(_:).md)
- [rotation()](pdfkit/pdfannotationtextwidget/rotation().md)
- [setRotation(_:)](pdfkit/pdfannotationtextwidget/setrotation(_:).md)

### Working with Field Names

- [fieldName()](pdfkit/pdfannotationtextwidget/fieldname().md)
- [setFieldName(_:)](pdfkit/pdfannotationtextwidget/setfieldname(_:).md)

### Instance Methods

- [attributedStringValue()](pdfkit/pdfannotationtextwidget/attributedstringvalue().md)
- [isMultiline()](pdfkit/pdfannotationtextwidget/ismultiline().md)
- [setAttributedStringValue(_:)](pdfkit/pdfannotationtextwidget/setattributedstringvalue(_:).md)
- [setIsMultiline(_:)](pdfkit/pdfannotationtextwidget/setismultiline(_:).md)

## Relationships

### Inherits From

- [PDFAnnotation](pdfkit/pdfannotation.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

### Deprecated Annotation Types

- [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)
