---
title: alignment()
framework: pdfkit
role: symbol
role_heading: Instance Method
path: pdfkit/pdfannotationfreetext/alignment()
---

# alignment()

Returns the horizontal alignment of text within the bounds of the annotation.

## Declaration

```swift
func alignment() -> NSTextAlignment
```

## Return Value

Return Value The horizontal alignment of text within the bounds of the annotation. Supported values are NSLeftTextAlignment, NSRightTextAlignment, and NSCenterTextAlignment.

## See Also

### Managing Text Alignment

- [setAlignment(_:)](pdfkit/pdfannotationfreetext/setalignment(_:).md)
