Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

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

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
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
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
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
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
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
See Also
Declared In
PDFAnnotationFreeText.h

Next Page > Hide TOC


Last updated: 2007-12-11




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice