Mac OS X Reference Library Apple Developer Connection spyglass button

PDFAnnotationFreeText Class Reference

Inherits from
Conforms to
Framework
Library/Frameworks/Quartz.framework/Frameworks/PDFKit.framework
Availability
Available in Mac OS X v10.4 and later.
Declared in
PDFAnnotationFreeText.h
Related sample code

Overview

A PDFAnnotationFreeText object displays text on a page.

Unlike a PDFAnnotationText object, a PDFAnnotationFreeText object has no open or closed state; its text is always visible. The text annotation performed in Preview uses PDFAnnotationFreeText.

The PDFAnnotation class’s contents and setContents: methods let you get and set the textual content for a PDFAnnotationFreeText object.

Tasks

Managing Text Alignment

Managing Font and Font Color

Instance Methods

alignment

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

- (NSTextAlignment)alignment

Return Value

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

Availability
  • Available in Mac OS X v10.4 and later.
See Also
Declared In
PDFAnnotationFreeText.h

font

Returns the font used for the annotation’s text field.

- (NSFont *)font

Return Value

The font used for the annotation’s text field.

Availability
  • Available in Mac OS X v10.4 and later.
See Also
Declared In
PDFAnnotationFreeText.h

fontColor

Returns the font color used in the text field of the annotation.

- (NSColor *)fontColor

Return Value

The font color used in the text field of the annotation.

Availability
  • Available in Mac OS X v10.5 and later.
See Also
Declared In
PDFAnnotationFreeText.h

setAlignment:

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

- (void)setAlignment:(NSTextAlignment)alignment

Parameters
alignment

Send NSLeftTextAlignment, NSRightTextAlignment, or NSCenterTextAlignment to set the horizontal alignment of text within the bounds of the annotation.

Availability
  • Available in Mac OS X v10.4 and later.
See Also
Declared In
PDFAnnotationFreeText.h

setFont:

Sets the font used in the text field of the annotation.

- (void)setFont:(NSFont *)font

Parameters
font

The font to be used in the text field of the annotation.

Availability
  • Available in Mac OS X v10.4 and later.
See Also
Declared In
PDFAnnotationFreeText.h

setFontColor:

Sets the font color used in the text field of the annotation.

- (void)setFontColor:(NSColor *)color

Parameters
color

The font color to be used in the text field of the annotation.

Availability
  • Available in Mac OS X v10.5 and later.
See Also
Declared In
PDFAnnotationFreeText.h


Last updated: 2007-12-11

Did this document help you? Yes It's good, but... Not helpful...