Class

PDFAnnotation

An annotation in a PDF document.

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 is associated with a specific location on a page and may offer interactivity with the user.

Topics

Initializing an Annotation

initWithBounds:

Initializes a PDF annotation object.

Deprecated

Accessing Information About an Annotation

page

Returns the page that the annotation is associated with.

modificationDate

Returns the modification date of the annotation.

userName

Returns the name of the user who created the annotation.

popup

Returns the pop-up annotation associated with an annotation.

mouseUpAction

Sets the action performed when a user releases the mouse button within an annotation.

Deprecated
type

Returns the type of the annotation.

contents

Returns the textual content (if any) associated with the annotation.

toolTip

Returns text for display as a help tag.

Deprecated

Managing Annotation Display Characteristics

bounds

Returns the bounding box for the annotation in page space.

border

Sets the border style for the annotation.

PDFBorder

An optional border for an annotation, drawn completely within the annotation rectangle.

color

Sets the stroke color for the annotation.

hasAppearanceStream

Returns a Boolean value that indicates whether the annotation has an appearance stream associated with it.

Managing Annotation Drawing and Output

drawWithBox:

Draws the annotation on its associated page.

Deprecated
shouldDisplay

Returns a Boolean value indicating whether the annotation should be displayed.

shouldPrint

Returns a Boolean value indicating whether the annotation should appear when the document is printed.

Annotation Keys

Deprecated Annotation Keys

These symbols are deprecated and should no longer be used.

Supporting Types

PDFBorderStyle

PDF Kit annotation borders may have the following styles.

PDFLineStyle

The following constants specify the available line ending styles.

PDFMarkupType

The styles available for markup annotations in PDF Kit.

PDFTextAnnotationIconType

Text annotations can use the following icon types.

PDFWidgetControlType

The types of annotation buttons.

Relationships

Inherits From

Conforms To

See Also

Annotations

PDFAction

An action that is performed when, for example, a PDF annotation is activated or an outline item is clicked.

PDFDestination

A PDFDestination object describes a point on a PDF page.

PDFBorder

An optional border for an annotation, drawn completely within the annotation rectangle.

Deprecated Annotations

These symbols are deprecated and should no longer be used.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software