You are on page 1of 257

PDF Kit Reference Collection

Contents

PDF Kit 7
Introduction 8

Classes 9 PDFAction Class Reference 10
Overview 10 Tasks 11 Instance Methods 11

PDFActionGoTo Class Reference 12
Overview 12 Tasks 12 Instance Methods 13

PDFActionNamed Class Reference 15
Overview 15 Tasks 15 Instance Methods 16 Constants 17

PDFActionRemoteGoTo Class Reference 20
Overview 20 Tasks 20 Instance Methods 21

PDFActionResetForm Class Reference 25
Overview 25 Tasks 25 Instance Methods 26

PDFActionURL Class Reference 29
Overview 29 Tasks 29

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

2

Contents

Instance Methods 30

PDFAnnotation Class Reference 32
Overview 32 Tasks 33 Instance Methods 35

PDFAnnotationButtonWidget Class Reference 49
Overview 49 Tasks 49 Instance Methods 51 Constants 60

PDFAnnotationChoiceWidget Class Reference 62
Overview 62 Tasks 62 Instance Methods 64

PDFAnnotationCircle Class Reference 70
Overview 70 Tasks 70 Instance Methods 71

PDFAnnotationFreeText Class Reference 72
Overview 72 Tasks 72 Instance Methods 73

PDFAnnotationInk Class Reference 76
Overview 76 Tasks 76 Instance Methods 77

PDFAnnotationLine Class Reference 79
Overview 79 Tasks 79 Instance Methods 80 Constants 85

PDFAnnotationLink Class Reference 87

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

3

Contents

Overview 87 Tasks 87 Instance Methods 88

PDFAnnotationMarkup Class Reference 91
Overview 91 Tasks 91 Instance Methods 92 Constants 94

PDFAnnotationPopup Class Reference 95
Overview 95 Tasks 95 Instance Methods 96

PDFAnnotationSquare Class Reference 97
Overview 97 Tasks 97 Instance Methods 98

PDFAnnotationStamp Class Reference 99
Overview 99 Tasks 99 Instance Methods 100

PDFAnnotationText Class Reference 101
Overview 101 Tasks 101 Instance Methods 102 Constants 104

PDFAnnotationTextWidget Class Reference 106
Overview 106 Tasks 106 Instance Methods 108

PDFBorder Class Reference 116
Overview 116 Tasks 116 Instance Methods 117

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

4

Contents

Constants 121

PDFDestination Class Reference 123
Overview 123 Tasks 123 Instance Methods 124 Constants 127

PDFDocument Class Reference 128
Overview 128 Tasks 128 Instance Methods 132 Delegate Methods 152 Constants 155 Notifications 157

PDFOutline Class Reference 161
Overview 161 Tasks 161 Instance Methods 163

PDFPage Class Reference 171
Overview 171 Tasks 172 Instance Methods 174 Constants 187

PDFSelection Class Reference 189
Overview 189 Tasks 189 Instance Methods 191

PDFThumbnailView Class Reference 198
Overview 198 Tasks 198 Instance Methods 200

PDFView Class Reference 208
Overview 208 Tasks 209

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

5

6 . 2007 Apple Inc. All Rights Reserved.Contents Instance Methods 215 Delegate Methods 247 Constants 249 Notifications 251 Document Revision History 256 2007-12-11 | © 2004.

PDF Kit Framework Header file directories Declared in Library/Frameworks/Quartz.h PDFAnnotationMarkup.h PDFAnnotationLink.framework/Headers PDFAction.h PDFThumbnailView.h PDFActionResetForm.framework/Frameworks/PDFKit.h PDFAnnotationChoiceWidget.h PDFDocument.h PDFAnnotationFreeText.h PDFAnnotationButtonWidget.h PDFAnnotationText.h PDFOutline.h PDFAnnotation.h 2007-12-11 | © 2004.h PDFAnnotationLine.h PDFAnnotationPopup.h PDFActionURL.h PDFActionRemoteGoTo.h PDFSelection. All Rights Reserved.h PDFAnnotationInk. 7 .h PDFAnnotationCircle.h PDFAnnotationSquare.framework/Frameworks/PDFKit.h PDFAnnotationTextWidget.h PDFActionGoTo.h PDFView.h PDFActionNamed.h PDFBorder.framework Library/Frameworks/Quartz.h PDFPage.h PDFAnnotationStamp. 2007 Apple Inc.h PDFDestination.

introduced with OS X version 10. PDF Kit includes a suite of Objective-C utility classes. lets you add PDF viewing and navigation to your Mac app with just a few clicks in Interface Builder. With PDF Kit. All Rights Reserved.PDF Kit Introduction Introduction Apple’s PDF Kit. allowing more control over annotations. selections. The Preview application in OS X v10.4. 2007 Apple Inc. and so on. 8 . If you want to go beyond simple PDF viewing. see PDF Kit Programming Guide . your application can access much of the functionality described in the Adobe PDF specification with just a small number of Cocoa classes. These utility classes provide lower-level support of PDF features. For more details about PDF Kit and how to implement it in your application.4 and later uses PDF Kit for PDF support. so you can use that application as an example of some of PDF Kit’s features. 2007-12-11 | © 2004.

All Rights Reserved. 9 .Classes 2007-12-11 | © 2004. 2007 Apple Inc.

PDFAction is an abstract superclass of the following concrete classes: ● PDFActionGoTo PDFActionNamed PDFActionRemoteGoTo PDFActionResetForm PDFActionURL ● ● ● ● 2007-12-11 | © 2004. PDF Annotation Editor Overview PDFAction. a PDF annotation is activated or an outline item is clicked. that the viewer application can perform.PDFAction Class Reference Inherits from Conforms to NSObject NSCopying NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. See the Adobe PDF Specification for more about actions and action types. for example. A PDFAction object represents an action associated with a PDF element.framework PDFKit/PDFAction. 2007 Apple Inc. a subclass of NSObject. such as an annotation or a link.h Available in OS X v10. represents an action that is performed when. 10 .framework/Frameworks/PDFKit. All Rights Reserved.5 and later.

Declared in PDFAction.PDFAction Class Reference Tasks Tasks Getting the Action Type – type (page 11) Returns the type of the action. 11 . Instance Methods type Returns the type of the action. 2007 Apple Inc.” depending on the original action as defined by the Adobe PDF Specification. . and the more familiar term “URL” is used instead.(NSString *)type Return Value The type of the PDF action. Discussion The PDF action type returned by this method may not correspond precisely to the name of a PDFAction subclass. In the PDF Kit.5 and later. For example. these two actions are handled in the single PDFActionURL subclass. a PDFActionURL object might return “URI” or “Launch. Availability Available in OS X v10.h 2007-12-11 | © 2004. All Rights Reserved.

framework PDFKit/PDFActionGoTo. Tasks Accessing the Destination – destination (page 13) Returns the destination associated with the action. (page 14) Sets the destination of the go-to action. PDF Annotation Editor Overview PDFActionGoTo. A PDFActionGoTo object represents the action of going to a specific location within the PDF document.PDFActionGoTo Class Reference Inherits from Conforms to PDFAction : NSObject NSCopying NSCopying (PDFAction) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. – setDestination: 2007-12-11 | © 2004. 2007 Apple Inc.h Available in OS X v10. defines methods for getting and setting the destination of a go-to action.5 and later. All Rights Reserved.framework/Frameworks/PDFKit. 12 . a subclass of PDFAction.

. or NULL if the object could not be initialized. Parameters destination The destination with which to initialize the go-to action. 2007-12-11 | © 2004. Instance Methods destination Returns the destination associated with the action. Return Value An initialized PDFActionGoTo instance.PDFActionGoTo Class Reference Instance Methods Initializing the Action – initWithDestination: (page 13) Initializes the go-to action. .(PDFDestination *)destination Return Value The destination specified by the go-to action.5 and later.5 and later.h initWithDestination: Initializes the go-to action. All Rights Reserved.(id)initWithDestination:(PDFDestination *) destination. See Also – setDestination: (page 14) Declared in PDFActionGoTo. Availability Available in OS X v10. 2007 Apple Inc. 13 . Availability Available in OS X v10.

Availability Available in OS X v10. . 2007 Apple Inc.5 and later.h 2007-12-11 | © 2004. 14 . All Rights Reserved.PDFActionGoTo Class Reference Instance Methods Related Sample Code PDF Annotation Editor Declared in PDFActionGoTo.h setDestination: Sets the destination of the go-to action.(void)setDestination:(PDFDestination *)destination Parameters destination The destination of the go-to action. See Also – destination (page 13) Declared in PDFActionGoTo.

5 and later.“ Tasks Accessing the Name of the Action – name (page 16) Returns the name of the named action. 15 .framework/Frameworks/PDFKit.framework PDFKit/PDFActionNamed. PDF Annotation Editor Overview PDFActionNamed defines methods used to work with actions in PDF documents. (page 17) Sets the name of the named action. some of which are named in the Adobe PDF Specification. such as “Go back” or “Zoom in.h Available in OS X v10. – setName: 2007-12-11 | © 2004. 2007 Apple Inc.PDFActionNamed Class Reference Inherits from Conforms to PDFAction : NSObject NSCopying NSCopying (PDFAction) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. All Rights Reserved. A PDFActionNamed object represents an action with a defined name.

5 and later. 2007-12-11 | © 2004. or NULL if the object could not be initialized. Discussion See “Named Action Names” for the names of named actions you can specify. Availability Available in OS X v10.(PDFActionNamedName)name Return Value The name of the named action. 2007 Apple Inc. Declared in PDFActionNamed.(id)initWithName:(PDFActionNamedName)name Parameters name The action name used to initialize the named action. 16 .PDFActionNamed Class Reference Instance Methods Initializing the Action – initWithName: (page 16) Initializes the PDFActionName object with the specified named action. All Rights Reserved. .5 and later.h name Returns the name of the named action. Availability Available in OS X v10. Instance Methods initWithName: Initializes the PDFActionName object with the specified named action. . Return Value An initialized PDFActionNamed instance.

All Rights Reserved. 2007 Apple Inc.h setName: Sets the name of the named action. kPDFActionNamedPreviousPage = 2. Discussion See “Named Action Names” for the names of named actions you can specify. kPDFActionNamedFirstPage = 3. .h Constants Named Action Names Names of supported actions. 17 . kPDFActionNamedLastPage = 4.(void)setName:(PDFActionNamedName)name Parameters name The action name to which to set the named action. kPDFActionNamedGoForward = 6. Availability Available in OS X v10. 2007-12-11 | © 2004. kPDFActionNamedNextPage = 1. enum { kPDFActionNamedNone = 0. kPDFActionNamedGoToPage = 7.PDFActionNamed Class Reference Constants See Also – setName Declared in PDFActionNamed. kPDFActionNamedGoBack = 5.5 and later. See Also – name Declared in PDFActionNamed.

PDFActionNamed Class Reference Constants kPDFActionNamedFind = 8. All Rights Reserved.h. Available in OS X v10.5 and later. kPDFActionNamedZoomOut = 11 }. 18 . 2007-12-11 | © 2004.5 and later. Declared in PDFActionNamed. Available in OS X v10. kPDFActionNamedNextPage The Next Page action. Declared in PDFActionNamed. kPDFActionNamedLastPage The Last Page action.5 and later.5 and later. Declared in PDFActionNamed. Available in OS X v10.h. Available in OS X v10. kPDFActionNamedZoomIn = 10. Available in OS X v10.5 and later. 2007 Apple Inc. Declared in PDFActionNamed. Declared in PDFActionNamed. Available in OS X v10. Declared in PDFActionNamed.h. kPDFActionNamedGoForward The Go Forward action.h.h. Available in OS X v10. kPDFActionNamedPreviousPage The Previous Page action.h. kPDFActionNamedGoBack The Go Back action. Constants kPDFActionNamedNone The action has no name. kPDFActionNamedFirstPage The First Page action.5 and later.5 and later. kPDFActionNamedPrint = 9. Declared in PDFActionNamed.h.

All Rights Reserved. Declared in PDFActionNamed. Available in OS X v10.h.5 and later. Available in OS X v10. 19 . Declared in PDFActionNamed.h 2007-12-11 | © 2004. Availability Available in OS X v10.h.h. Declared in PDFActionNamed.PDFActionNamed Class Reference Constants kPDFActionNamedGoToPage The Go to Page action.5 and later.h. kPDFActionNamedZoomIn The Zoom In action.5 and later. Available in OS X v10. Declared in PDFActionNamed. Available in OS X v10. Declared in PDFActionNamed. kPDFActionNamedFind The Find action. Available in OS X v10.5 and later. 2007 Apple Inc. Declared in PDFActionNamed. kPDFActionNamedZoomOut The Zoom Out action.h. kPDFActionNamedPrint The Print action.5 and later.5 and later.

framework PDFKit/PDFActionRemoteGoTo.5 and later. 20 . point. a subclass of PDFAction. All Rights Reserved. Accessing the Page Index of the Referenced Document – pageIndex (page 22) Returns the zero-based page index referenced by the remote go-to action. – setPageIndex: 2007-12-11 | © 2004. and document URL.h Available in OS X v10. (page 23) Sets the zero-based page index referenced by the remote go-to action. 2007 Apple Inc.framework/Frameworks/PDFKit. Overview PDFActionRemoteGoTo.PDFActionRemoteGoTo Class Reference Inherits from Conforms to PDFAction : NSObject NSCopying NSCopying (PDFAction) NSObject (NSObject) Framework Declared in Availability Library/Frameworks/Quartz. Tasks Initializing the Remote Go-to Action – initWithPageIndex:atPoint:fileURL: (page 21) Initializes the remote go-to action with the specified page index. defines methods for getting and setting the destination of a go-to action that targets another document.

21 . on the page referenced by the remote go-to action. not a PDFPage object.PDFActionRemoteGoTo Class Reference Instance Methods Accessing a Point on the Referenced Page – point (page 22) Returns the point. and document URL. url The URL of the remote PDF document.. in page space. – setURL: Instance Methods initWithPageIndex:atPoint:fileURL: Initializes the remote go-to action with the specified page index. or NULL if the object could not be initialized. point. 2007 Apple Inc. – setPoint: Accessing the URL of the Referenced Document – URL (page 24) Returns the URL of the document referenced by the remote go-to action. This simplifies the handling of remote destinations for documents that may not be instantiated yet. on the page referenced by the remote go-to action. 2007-12-11 | © 2004.(id)initWithPageIndex:(NSUInteger)pageIndex atPoint:(NSPoint)point fileURL:(NSURL *)url Parameters pageIndex The page index of the remote document. All Rights Reserved. . point The point on the page in the remote document. Return Value An initialized PDFActionRemoteGoTo instance. (page 23) Sets the URL of the document referenced by the remote go-to action. (page 23) Sets the point. in page space. Discussion The PDFActionRemoteGoTo object uses a zero-based page index.

Declared in PDFActionRemoteGoTo. . See Also – setPageIndex: (page 23) Declared in PDFActionRemoteGoTo. Declared in PDFActionRemoteGoTo. All Rights Reserved. no position on the page is specified. 22 .h point Returns the point.h pageIndex Returns the zero-based page index referenced by the remote go-to action.(NSUInteger)pageIndex Return Value The page index referenced by the remote go-to action. Availability Available in OS X v10. If either the x value or the y value of the point is kPDFDestinationUnspecifiedValue.5 and later. on the page referenced by the remote go-to action.h 2007-12-11 | © 2004. 2007 Apple Inc. Discussion Page space is a 72-dpi coordinate system with the origin at the lower-left corner of the current page.5 and later.(NSPoint)point Return Value The point on the page of the remote document referenced by the action. .PDFActionRemoteGoTo Class Reference Instance Methods Availability Available in OS X v10.5 and later. in page space. Availability Available in OS X v10.

Availability Available in OS X v10. . All Rights Reserved. in page space. on the page referenced by the remote go-to action. no position on the page is specified. 2007 Apple Inc. Availability Available in OS X v10.(void)setPageIndex:(NSUInteger)pageIndex Parameters pageIndex The page index in the remote document to go to. . .PDFActionRemoteGoTo Class Reference Instance Methods setPageIndex: Sets the zero-based page index referenced by the remote go-to action. If either the x value or the y value of the point is kPDFDestinationUnspecifiedValue. 23 .5 and later. Declared in PDFActionRemoteGoTo. See Also – pageIndex (page 22) Declared in PDFActionRemoteGoTo. Discussion Page space is a 72-dpi coordinate system with the origin at the lower-left corner of the current page.(void)setPoint:(NSPoint)point Parameters point The point on the remote page to go to.5 and later.(void)setURL:(NSURL *)url 2007-12-11 | © 2004.h setURL: Sets the URL of the document referenced by the remote go-to action.h setPoint: Sets the point.

(NSURL *)URL Return Value The URL of the remote document referenced by the action.5 and later. All Rights Reserved.h URL Returns the URL of the document referenced by the remote go-to action. 24 .h 2007-12-11 | © 2004. Declared in PDFActionRemoteGoTo. Availability Available in OS X v10.5 and later.PDFActionRemoteGoTo Class Reference Instance Methods Parameters url The URL of the remote document to go to. Declared in PDFActionRemoteGoTo. Availability Available in OS X v10. 2007 Apple Inc. .

All Rights Reserved. 2007 Apple Inc.framework/Frameworks/PDFKit.PDFActionResetForm Class Reference Inherits from Conforms to PDFAction : NSObject NSCopying NSCopying (PDFAction) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz.h Available in OS X v10. 25 .framework PDFKit/PDFActionResetForm. Tasks Initializing a Reset Form Action – init (page 27) Initializes a reset form action. 2007-12-11 | © 2004. PDF Annotation Editor Overview PDFActionResetForm.5 and later. A PDFActionResetForm object represents an action associated with a PDF form. a subclass of PDFAction. defines methods for getting and clearing fields in a PDF form.

(page 28) Sets whether the fields associated with the reset action are cleared when the action is performed. This method can return NULL.h fieldsIncludedAreCleared Returns whether the fields associated with the reset action are cleared when the action is performed. 2007 Apple Inc. – setFields: Determining Whether Fields Are Cleared When the Action Is Performed – fieldsIncludedAreCleared (page 26) Returns whether the fields associated with the reset action are cleared when the action is performed. – setFieldsIncludedAreCleared: Instance Methods fields Returns an array of fields associated with the reset action. 2007-12-11 | © 2004. Availability Available in OS X v10. See Also – setFields Declared in PDFActionResetForm. . (page 27) Sets the array of fields associated with the reset action. 26 .PDFActionResetForm Class Reference Instance Methods Accessing and Changing Fields – fields (page 26) Returns an array of fields associated with the reset action. All Rights Reserved.5 and later.(NSArray *)fields Return Value An array of NSString objects that corresponds to the fieldNames property of widget annotations (such as PDFAnnotationButtonWidget) on the PDF page.

(void)setFields:(NSArray *)fields Parameters fields An array of strings that represent field names. 2007-12-11 | © 2004.PDFActionResetForm Class Reference Instance Methods . 27 . or NULL if the object could not be initialized.5 and later. 2007 Apple Inc. If NO.(id)init Return Value An initialized PDFActionResetForm instance. but all other fields in the document are cleared. Availability Available in OS X v10. See Also – setFieldsIncludedAreCleared: Declared in PDFActionResetForm. Discussion Initially. Availability Available in OS X v10. there are no fields and fieldsIncludedAreCleared (page 26) returns YES. they are not cleared. Declared in PDFActionResetForm. the fields are excluded from the reset action.5 and later.h init Initializes a reset form action. . that is. .(BOOL)fieldsIncludedAreCleared Discussion If YES. All Rights Reserved.h setFields: Sets the array of fields associated with the reset action. the reset action’s fields are cleared when the action is performed.

Availability Available in OS X v10. 2007 Apple Inc.h 2007-12-11 | © 2004.(void)setFieldsIncludedAreCleared:(BOOL)include Parameters include Pass YES to clear the fields associated with the action when the reset action is performed.h setFieldsIncludedAreCleared: Sets whether the fields associated with the reset action are cleared when the action is performed. 28 . All Rights Reserved. Pass NO to exclude from the reset action only the fields associated with the action. . See Also – fieldsIncludedAreCleared Declared in PDFActionResetForm. See Also – fields Declared in PDFActionResetForm.5 and later.PDFActionResetForm Class Reference Instance Methods Availability Available in OS X v10.5 and later.

29 .framework PDFKit/PDFActionURL. Accessing and Changing the URL – URL (page 31) Returns the URL associated with the URL action. a subclass of PDFAction.h Available in OS X v10.5 and later. defines methods for getting and setting the URL associated with a URL action.framework/Frameworks/PDFKit. 2007 Apple Inc. 2007-12-11 | © 2004. PDF Annotation Editor Overview PDFActionURL. Tasks Initializing a URL Action – initWithURL: (page 30) Initializes a URL action with the specified URL.PDFActionURL Class Reference Inherits from Conforms to PDFAction : NSObject NSCopying NSCopying (PDFAction) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. All Rights Reserved.

5 and later. Availability Available in OS X v10. Return Value An initialized PDFActionURL instance. 2007 Apple Inc. . 30 . or NULL if the object could not be initialized. Instance Methods initWithURL: Initializes a URL action with the specified URL. Declared in PDFActionURL. .(id)initWithURL:(NSURL *)url Parameters url The URL to set the action to. All Rights Reserved. Availability Available in OS X v10.(void)setURL:(NSURL *)url Parameters url The URL to set the action to.h setURL: Sets the URL associated with the URL action. See Also – URL 2007-12-11 | © 2004.PDFActionURL Class Reference Instance Methods – setURL: (page 30) Sets the URL associated with the URL action.5 and later.

h URL Returns the URL associated with the URL action. 31 . or NULL if no URL is specified. Availability Available in OS X v10. See Also – setURL: Declared in PDFActionURL.5 and later. All Rights Reserved. .(NSURL *)URL Return Value The URL associated with the action. 2007 Apple Inc.PDFActionURL Class Reference Instance Methods Declared in PDFActionURL.h 2007-12-11 | © 2004.

and so on.framework PDFKit/PDFAnnotation. textual notes. highlighting circles.4 and later. See the Adobe PDF Specification for more on annotations. When a PDF file is being parsed. 2007 Apple Inc. any unknown or unsupported annotation is represented as a PDFAnnotation object. however. which associates an object (such as a note or a sound) with a location in a PDF document. are much more useful. Link Snoop PDF Annotation Editor Overview PDFAnnotation.PDFAnnotation Class Reference Inherits from Conforms to NSObject NSCopying NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. You are not likely to work with a PDFAnnotation object by itself. a PDF file can contain annotations that represent links. form elements. PDFAnnotation is an abstract superclass of the following concrete classes: ● PDFAnnotationButtonWidget PDFAnnotationCircle PDFAnnotationFreeText PDFAnnotationInk PDFAnnotationLine ● ● ● ● 2007-12-11 | © 2004. In addition to its primary textual content. because the specific subclasses.h Available in OS X v10.framework/Frameworks/PDFKit. represents an annotation in a PDF document. Each annotation is associated with a specific location on a page and may offer interactivity with the user. All Rights Reserved. a subclass of NSObject. 32 . such as PDFAnnotationCircle.

PDFAnnotation Class Reference Tasks ● PDFAnnotationLink PDFAnnotationMarkup PDFAnnotationPopup PDFAnnotationSquare PDFAnnotationStamp PDFAnnotationText PDFAnnotationTextWidget ● ● ● ● ● ● Tasks Initializing an Annotation – initWithBounds: (page 38) Initializes a PDF annotation object. (page 48) Returns the name of the user who created the annotation. (page 40) Returns the pop-up annotation associated with an annotation. (page 39) Returns the modification date of the annotation. (page 43) Sets the modification date of the annotation. (page 46) Sets the name of the user who created the annotation. (page 44) Sets the pop-up annotation associated with an annotation. (page 39) Returns the optional action performed when a user releases the mouse button within an annotation. Accessing Information About an Annotation – page (page 40) Returns the page that the annotation is associated with. 33 . 2007 Apple Inc. – modificationDate – setModificationDate: – userName – setUserName: – popup – setPopup: – mouseUpAction 2007-12-11 | © 2004. All Rights Reserved.

(page 36) Returns the textual content (if any) associated with the annotation. (page 38) Returns a Boolean value that indicates whether the annotation has an appearance stream associated with it. – setBounds: – border – setBorder: – color – setColor: – hasAppearanceStream Managing Annotation Drawing and Output – drawWithBox: (page 37) Draws the annotation on its associated page. – type – contents – setContents: – toolTip Managing Annotation Display Characteristics – bounds (page 35) Returns the bounding box for the annotation in page space. (page 41) Sets the bounding box for the annotation. (page 42) Sets the stroke color for the annotation. 34 . (page 35) Returns the border style for the annotation. (page 41) Sets the border style for the annotation. 2007-12-11 | © 2004. (page 48) Returns the type of the annotation.PDFAnnotation Class Reference Tasks – setMouseUpAction: (page 43) Sets the action performed when a user releases the mouse button within an annotation. 2007 Apple Inc. (page 42) Specifies the textual content associated with the annotation. (page 47) Returns text for display as a help tag. All Rights Reserved. (page 36) Returns the stroke color for the annotation.

(page 45) Specifies whether the annotation should be displayed. – setShouldDisplay: – shouldPrint – setShouldPrint: Instance Methods border Returns the border style for the annotation. .(NSRect)bounds Return Value The bounding box for the annotation in page space. 2007 Apple Inc. (page 47) Returns a Boolean value indicating whether the annotation should appear when the document is printed. 35 .h bounds Returns the bounding box for the annotation in page space. Availability Available in OS X v10. 2007-12-11 | © 2004. (page 45) Specifies whether the annotation should appear when the document is printed. All Rights Reserved. . See “Constants” (page 121) in the PDFBorder class for possible values.4 and later.(PDFBorder *)border Return Value The border style for the annotation. See Also – setBorder: (page 41) Related Sample Code PDF Annotation Editor Declared in PDFAnnotation.PDFAnnotation Class Reference Instance Methods – shouldDisplay (page 46) Returns a Boolean value indicating whether the annotation should be displayed.

(NSColor *)color Return Value The stroke color for the annotation. . See Also – setColor: (page 42) Declared in PDFAnnotation.4 and later. 2007 Apple Inc. 36 .PDFAnnotation Class Reference Instance Methods Discussion Page space is a 72-dpi coordinate system with the origin at the lower-left corner of the current page. See Also – setBounds: (page 41) Related Sample Code Link Snoop PDF Annotation Editor Declared in PDFAnnotation. All Rights Reserved. Availability Available in OS X v10.(NSString *)contents 2007-12-11 | © 2004. Availability Available in OS X v10. Discussion Where this color is used depends on the type of annotation.4 and later. .h color Returns the stroke color for the annotation.h contents Returns the textual content (if any) associated with the annotation.

All Rights Reserved.4 and later.4 and later. For additional information see the “Constants” section in the PDFPage class. 2007 Apple Inc. . Availability Available in OS X v10.PDFAnnotation Class Reference Instance Methods Return Value A string representing the textual content associated with the annotation. Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. Discussion Textual content is typically associated with PDFAnnotationText and PDFAnnotationFreeText annotations. Discussion The annotation is drawn relative to the origin of box in page space.(void)drawWithBox:(PDFDisplayBox)box Parameters box The bounding box used to draw the annotation in. Availability Available in OS X v10. 37 .h drawWithBox: Draws the annotation on its associated page. See Also – boundsForBox: (page 176) Declared in PDFAnnotation. See Also – setContents: – toolTip (page 42) (page 47) Declared in PDFAnnotation.h 2007-12-11 | © 2004.

. or NULL if the object could not be initialized. All Rights Reserved. Invoking initWithBounds: directly on a PDFAnnotation object creates an illegal NULL type. Availability Available in OS X v10. Return Value An initialized PDFAnnotation instance. PDF Kit draws the annotation using the stream.4 and later. Availability Available in OS X v10. 2007 Apple Inc. Provide bounds in page space.PDFAnnotation Class Reference Instance Methods hasAppearanceStream Returns a Boolean value that indicates whether the annotation has an appearance stream associated with it.4 and later. Discussion Subclasses of PDFAnnotation should use this method to initialize annotation instances. 38 .(BOOL) hasAppearanceStream Return Value YES if the annotation has an appearance stream. If an appearance stream exists.(id)initWithBounds:(NSRect)bounds Parameters bounds The bounding box of the annotation. otherwise NO. which may override existing set parameters (such as the stroke color set with setColor). Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. Discussion An appearance stream is a sequence of draw instructions used to render a PDF item. Declared in PDFAnnotation. .h initWithBounds: Initializes a PDF annotation object. Related Sample Code PDF Annotation Editor 2007-12-11 | © 2004. in page space.

5 and later. Availability Available in OS X v10. 39 .h modificationDate Returns the modification date of the annotation.h 2007-12-11 | © 2004. All Rights Reserved. See Also – setModificationDate Declared in PDFAnnotation.(NSDate *)modificationDate Return Value The modification date of the annotation. Availability Available in OS X v10.h mouseUpAction Returns the optional action performed when a user releases the mouse button within an annotation.5 and later.(PDFAction *)mouseUpAction Return Value The PDF action performed when a user releases the mouse button within an annotation. .PDFAnnotation Class Reference Instance Methods Declared in PDFAnnotation. . 2007 Apple Inc. or NULL if there is no modification date. See Also – setMouseUpAction Related Sample Code PDF Annotation Editor Declared in PDFAnnotation.

. Related Sample Code Link Snoop PDF Annotation Editor Declared in PDFAnnotation. See Also – setPopup Related Sample Code PDF Annotation Editor 2007-12-11 | © 2004. Availability Available in OS X v10. 2007 Apple Inc. Discussion Pop-up annotations are not used with links or widgets.PDFAnnotation Class Reference Instance Methods page Returns the page that the annotation is associated with.(PDFAnnotationPopup *)popup Return Value The pop-up annotation associated with the annotation.4 and later. All Rights Reserved. Availability Available in OS X v10.(PDFPage *)page Return Value The PDF page associated with the annotation. 40 .5 and later. or NULL if no pop-up exists. The bounds and open state of the pop-up annotation indicate the placement and open state of the pop-up window. .h popup Returns the pop-up annotation associated with an annotation. Discussion The addAnnotation: (page 174) method in the PDFPage class lets you associate an annotation with a page.

. See “Constants” (page 121) in the PDFBorder class for the available styles. All Rights Reserved. 2007-12-11 | © 2004. See Also – border (page 35) Related Sample Code PDF Annotation Editor Declared in PDFAnnotation. Availability Available in OS X v10. 41 .h setBorder: Sets the border style for the annotation. The border style attribute is optional. .4 and later. The bounds attribute is required for all annotations. Discussion Page space is a 72-dpi coordinate system with the origin at the lower-left corner of the current page. Use page space for bounds.(void)setBounds:(NSRect)bounds Parameters bounds The bounding box for the annotation. 2007 Apple Inc.h setBounds: Sets the bounding box for the annotation. Availability Available in OS X v10.4 and later.(void)setBorder:(PDFBorder *)border Parameters border The border style for the annotation.PDFAnnotation Class Reference Instance Methods Declared in PDFAnnotation.

Discussion Where this color is used depends on the annotation type. 2007-12-11 | © 2004. .(void)setContents:(NSString *)contents Parameters contents A string representing the textual contents associated with the annotation.h setColor: Sets the stroke color for the annotation. All Rights Reserved.4 and later. 2007 Apple Inc. 42 . . Availability Available in OS X v10.(void)setColor:(NSColor *)color Parameters color The stroke color for the annotation. See Also – color (page 36) Related Sample Code PDF Annotation Editor Declared in PDFAnnotation.h setContents: Specifies the textual content associated with the annotation.PDFAnnotation Class Reference Instance Methods See Also – bounds (page 35) Declared in PDFAnnotation.

See Also – modificationDate Declared in PDFAnnotation. See Also (page 36) – toolTip (page 47) – contents Related Sample Code PDF Annotation Editor Declared in PDFAnnotation.PDFAnnotation Class Reference Instance Methods Discussion Textual content is typically associated with PDFAnnotationText and PDFAnnotationFreeText annotations. Discussion The modification date is optional.h setMouseUpAction: Sets the action performed when a user releases the mouse button within an annotation. 2007 Apple Inc. PDFView displays the associated textual content as a help tag. .5 and later. For most annotation types. All Rights Reserved.4 and later.(void)setModificationDate:(NSDate *)date Parameters date The modification date to associate with the annotation.h setModificationDate: Sets the modification date of the annotation.(void)setMouseUpAction:(PDFAction *)action 2007-12-11 | © 2004. . 43 . Availability Available in OS X v10. Availability Available in OS X v10.

Discussion The mouse-up action is optional. 44 .h setPopup: Sets the pop-up annotation associated with an annotation. 2007 Apple Inc. Availability Available in OS X v10.(void)setPopup:(PDFAnnotationPopup *)popup Parameters popup The pop-up annotation to associate with the annotation.5 and later.PDFAnnotation Class Reference Instance Methods Parameters action The PDF action to be performed when a user releases the mouse button within an annotation. Discussion A pop-up annotation is not associated with links or widgets. See Also – mouseUpAction Related Sample Code PDF Annotation Editor Declared in PDFAnnotation.h 2007-12-11 | © 2004. Availability Available in OS X v10. . The bounds and open state of the pop-up annotation indicate the placement and open state of the pop-up window. See Also – popup Declared in PDFAnnotation. All Rights Reserved.5 and later.

h setShouldPrint: Specifies whether the annotation should appear when the document is printed. Availability Available in OS X v10.(void)setShouldDisplay:(BOOL)display Parameters display Set this value to YES to display the annotation or NO otherwise.4 and later.(void)setShouldPrint:(BOOL)print Parameters print Set this value to YES to ensure the annotation appears when the document is printed or NO otherwise. See Also – shouldPrint (page 47) Related Sample Code PDF Annotation Editor Declared in PDFAnnotation. . All Rights Reserved. .PDFAnnotation Class Reference Instance Methods setShouldDisplay: Specifies whether the annotation should be displayed. See Also – shouldDisplay (page 46) Related Sample Code PDF Annotation Editor Declared in PDFAnnotation. Availability Available in OS X v10.4 and later. 2007 Apple Inc.h 2007-12-11 | © 2004. 45 .

See Also – userName Declared in PDFAnnotation. See Also – setShouldDisplay: (page 45) Declared in PDFAnnotation. otherwise NO. 46 . .PDFAnnotation Class Reference Instance Methods setUserName: Sets the name of the user who created the annotation.h shouldDisplay Returns a Boolean value indicating whether the annotation should be displayed. 2007 Apple Inc.h 2007-12-11 | © 2004.5 and later. Availability Available in OS X v10. . Discussion PDFPage respects this flag when drawing.(BOOL)shouldDisplay Return Value YES if the annotation should be displayed.(void)userName:(NSString *)name Parameters name The name of the user who created the annotation.4 and later. Availability Available in OS X v10. Discussion The user name is optional. All Rights Reserved.

Availability Available in OS X v10.h toolTip Returns text for display as a help tag. Declared in PDFAnnotation. otherwise NO. a PDFAnnotationLink object displays a URL or page destination for its help tag. . . PDF Kit’s annotation subclasses override this behavior as appropriate. Availability Available in OS X v10. Discussion PDFPage respects this flag when printing. Discussion This method is equivalent to sending the message [self contents]. 2007 Apple Inc.4 and later.PDFAnnotation Class Reference Instance Methods shouldPrint Returns a Boolean value indicating whether the annotation should appear when the document is printed. For example. or NULL if there is no text associated with the annotation. 47 .(BOOL)shouldPrint Return Value YES if the annotation should appear when the PDF document is printed. All Rights Reserved. See Also – setShouldPrint: (page 45) Declared in PDFAnnotation.h 2007-12-11 | © 2004.(NSString *)toolTip Return Value A string that contains help tag content.4 and later.

Text. Availability Available in OS X v10. referring to the PDFAnnotation subclasses.5 and later.h userName Returns the name of the user who created the annotation. All Rights Reserved. . Types include Line. 48 . In the Adobe PDF Specification.(NSString *)userName Return Value The name of the user who created the annotation. Declared in PDFAnnotation.PDFAnnotation Class Reference Instance Methods type Returns the type of the annotation. or NULL if no user name is set. Link. . this attribute is called Subtype. and so on. and the common “type” for all annotations in the PDF Specification is Annot.(NSString *)type Return Value The type of the annotation. See Also – setUserName Declared in PDFAnnotation. Availability Available in OS X v10. 2007 Apple Inc.h 2007-12-11 | © 2004.4 and later.

(page 57) Sets the type of the control. There are three types of buttons available: push button. 2007 Apple Inc. 49 . If you use a PDFAnnotationButtonWidget object. unless you are simply using PDFView to display content.PDFAnnotationButtonWidget Class Reference Inherits from Conforms to PDFAnnotation : NSObject NSCopying NSCopying (PDFAnnotation) NSObject (NSObject) Framework Availability Declared in Related sample code Library/Frameworks/Quartz.4 and later.framework Available in OS X v10.framework/Frameworks/PDFKit. – setControlType: 2007-12-11 | © 2004. your application must handle hit testing.h PDF Annotation Editor Overview A PDFAnnotationButtonWidget object provides user interactivity on a page of a PDF document. PDFAnnotationButtonWidget inherits general annotation behavior from the PDFAnnotation class. All Rights Reserved. and checkbox. This is because PDFView automatically handles hit testing for you. PDFKit/PDFAnnotationButtonWidget. Tasks Getting and Setting the Control Type – controlType (page 53) Returns the type of the control. radio button.

If you need to find other buttons in the same group. (page 58) Sets the font color used in the control’s label. 50 . 2007 Apple Inc. (page 52) Returns the background color of the control. look for button widget objects that return the same value in fieldName. – setHighlighted: – backgroundColor – setBackgroundColor: Getting and Setting the Control Label Font Attributes – font (page 53) Returns the font used in the control’s label. such as a group of radio buttons. – setFont: – fontColor – setFontColor: 2007-12-11 | © 2004. you do not need information about the parent object.4 through OS X v10. (page 56) Sets the control’s background color. Instead. – setState: Getting and Setting the Control’s Appearance – isHighlighted (page 54) Returns a Boolean value that indicates whether the control is highlighted when it is drawn.) Getting and Setting the Control’s State – state (page 60) Returns the state of the control. (page 54) Returns the font color used in the control’s label. (page 59) Sets the state of the control.PDFAnnotationButtonWidget Class Reference Tasks – parentID (page 55) Available in OS X v10. All Rights Reserved. (page 57) Sets the font of the control’s label. (page 58) Sets the control’s highlighting when it is drawn.4 Gets the ID of the parent object. (Deprecated.

(BOOL)allowsToggleToOff Return Value YES if clicking a radio button control that is already in the on state toggles it to the off state. (page 57) Sets the internal name of a field (used for reset-form actions). – setOnStateValue: – fieldName – setFieldName: Instance Methods allowsToggleToOff Returns a Boolean value indicating whether a radio button behaves in a toggling manner. Managing Control State Values and Form Fields – onStateValue (page 55) Returns the string associated with the on state of a radio button or checkbox control. (page 56) Sets the text of the label on a push button control. . – setCaption: Managing Radio Button Behavior – allowsToggleToOff (page 51) Returns a Boolean value indicating whether a radio button behaves in a toggling manner.5 and later. (page 59) Sets the string that is associated with the on state of a radio button or checkbox control.PDFAnnotationButtonWidget Class Reference Instance Methods Getting and Setting the Control Label Text – caption (page 52) Returns the text of the label on a push button control. 2007 Apple Inc. 2007-12-11 | © 2004. All Rights Reserved. (page 53) Returns the internal name of a field (used for reset-form actions). Availability Available in OS X v10. 51 . otherwise NO.

PDFAnnotationButtonWidget Class Reference Instance Methods Declared in PDFAnnotationButtonWidget. Availability Available in OS X v10.4 and later.h 2007-12-11 | © 2004. See Also – setCaption: Declared in PDFAnnotationButtonWidget.h backgroundColor Returns the background color of the control.(NSColor *)backgroundColor Return Value The color drawn in the background of the control. See Also – setBackgroundColor: (page 56) Declared in PDFAnnotationButtonWidget. 52 . Discussion This method applies only to the label drawn on a control of type kPDFWidgetPushButtonControl. Availability Available in OS X v10. 2007 Apple Inc. .(NSString *)caption Return Value The label drawn on a push button control. . All Rights Reserved.5 and later.h caption Returns the text of the label on a push button control.

(NSFont *)font 2007-12-11 | © 2004. 53 . Availability Available in OS X v10.h fieldName Returns the internal name of a field (used for reset-form actions). .(NSString *)fieldName Return Value The internal name of a field. See “Constants” (page 60) for the various control types.h font Returns the font used in the control’s label. All Rights Reserved. .PDFAnnotationButtonWidget Class Reference Instance Methods controlType Returns the type of the control. See Also – setControlType Declared in PDFAnnotationButtonWidget.4 and later. 2007 Apple Inc. Discussion The internal name of a field is an optional value.(PDFWidgetControlType)controlType Return Value The type of control the button represents.5 and later. Availability Available in OS X v10. . See Also – setFieldName Declared in PDFAnnotationButtonWidget.

Availability Available in OS X v10.(BOOL)isHighlighted Return Value YES if the control is highlighted when it is drawn. Availability Available in OS X v10.PDFAnnotationButtonWidget Class Reference Instance Methods Return Value The font used in the control’s label.(NSColor *)fontColor Return Value The font color used in the control’s label. 2007 Apple Inc. 2007-12-11 | © 2004. See Also – setFontColor: Declared in PDFAnnotationButtonWidget.h isHighlighted Returns a Boolean value that indicates whether the control is highlighted when it is drawn. Availability Available in OS X v10.5 and later. 54 . otherwise NO. . .h fontColor Returns the font color used in the control’s label. See Also – setFont: Declared in PDFAnnotationButtonWidget.5 and later. All Rights Reserved.5 and later.

55 .4 through OS X v10. such as a group of radio buttons.4. (Available in OS X v10. see the Adobe PDF specification. you do not need information about the parent object.5 and later. Availability Available in OS X v10.PDFAnnotationButtonWidget Class Reference Instance Methods See Also – setHighlighted: Declared in PDFAnnotationButtonWidget. All Rights Reserved. See Also – setOnStateValue Declared in PDFAnnotationButtonWidget.h parentID Gets the ID of the parent object.) . Availability Available in OS X v10. . 2007 Apple Inc.4 through OS X v10. Instead.4. If you need to find other buttons in the same group.h onStateValue Returns the string associated with the on state of a radio button or checkbox control.(unsigned)parentID Discussion For more information about the field names of annotations. look for button widget objects that return the same value in fieldName. Discussion This is a required string for controls of types kPDFWidgetRadioButtonControl and kPDFWidgetCheckBoxControl.(NSString *)onStateValue Return Value The string associated with the on state of a radio button or checkbox control. The off state is always labeled “Off” . 2007-12-11 | © 2004.

Availability Available in OS X v10. See Also – backgroundColor (page 52) Declared in PDFAnnotationButtonWidget.(void)setBackgroundColor:(NSColor *)color Parameters color The color to be drawn in the control’s background. 56 .5 and later. All Rights Reserved. Availability Available in OS X v10.h setCaption: Sets the text of the label on a push button control. .h setBackgroundColor: Sets the control’s background color. See Also – caption Declared in PDFAnnotationButtonWidget.4 and later.h 2007-12-11 | © 2004. 2007 Apple Inc.PDFAnnotationButtonWidget Class Reference Instance Methods Declared in PDFAnnotationButtonWidget.(void)setCaption:(NSString *)name Parameters name The text to be used as the label on a push button control. .

h setFieldName: Sets the internal name of a field (used for reset-form actions). 57 .(void)setFieldName:(NSString *)name Parameters name The internal name of a field. “Constants” (page 60) lists the various control types you can send for this value. All Rights Reserved. .PDFAnnotationButtonWidget Class Reference Instance Methods setControlType: Sets the type of the control. Availability Available in OS X v10.(void)setFont:(NSFont *)font 2007-12-11 | © 2004.5 and later. .(void)setControlType:(PDFWidgetControlType)type Parameters type The type of control for the button. See Also – controlType Declared in PDFAnnotationButtonWidget.h setFont: Sets the font of the control’s label. . 2007 Apple Inc. Availability Available in OS X v10.5 and later. This is an optional value. See Also – fieldName Declared in PDFAnnotationButtonWidget.

. See Also – fontColor Declared in PDFAnnotationButtonWidget. 58 . 2007 Apple Inc.5 and later. All Rights Reserved. Availability Available in OS X v10. See Also – font Declared in PDFAnnotationButtonWidget. Availability Available in OS X v10.PDFAnnotationButtonWidget Class Reference Instance Methods Parameters font The desired font for the control’s label.5 and later.(void)setFontColor:(NSColor *)color Parameters color The desired font color of the control’s label.h setFontColor: Sets the font color used in the control’s label.h setHighlighted: Sets the control’s highlighting when it is drawn.(void)setHighlighted:(BOOL)flag Parameters flag Set this value to YES to cause the control to be highlighted when it is drawn or NO otherwise. . 2007-12-11 | © 2004.

For example.(void)setState:(int)value 2007-12-11 | © 2004. Although “On” is an acceptable string for the on state of a single checkbox. See Also – isHighlighted Declared in PDFAnnotationButtonWidget. or investment. . a form might display a group of 3 radio buttons that allow users to indicate an account type.“ Availability Available in OS X v10. See Also – onStateValue – fieldName Declared in PDFAnnotationButtonWidget.“ “Checking.h setState: Sets the state of the control. such as savings.4 and later.“ In this example. checking.h setOnStateValue: Sets the string that is associated with the on state of a radio button or checkbox control. All Rights Reserved. these 3 radio buttons also would share a field name string.5 and later.PDFAnnotationButtonWidget Class Reference Instance Methods Availability Available in OS X v10. 2007 Apple Inc. such as “AccountType. a group of two or more radio buttons should have a unique string associated with each control. The strings associated with the on states of these buttons could be “Savings. 59 .(void)setOnStateValue:(NSString *)name Discussion Required for controls of types kPDFWidgetRadioButtonControl and kPDFWidgetCheckBoxControl. . the value of name describes the on state of the control (the off state is always labeled “Off”).“ and “Investment.

Availability Available in OS X v10. . All Rights Reserved. 2007-12-11 | © 2004.PDFAnnotationButtonWidget Class Reference Constants Parameters value The state the control should be in. checked or unchecked) affects how it is drawn. See Also – state (page 60) Declared in PDFAnnotationButtonWidget. 2007 Apple Inc. Availability Available in OS X v10. Discussion A control’s state (for example. NSOffState otherwise.h Constants Types of PDF Annotation Buttons The types of annotation buttons.4 and later. See Also – setState: (page 59) Declared in PDFAnnotationButtonWidget. 60 .4 and later.h state Returns the state of the control.(int)state Return Value NSOnState if the control is on. Note that push buttons are always in the on state.

Available in OS X v10. kPDFWidgetPushButtonControl Push button control. Available in OS X v10. kPDFWidgetRadioButtonControl Radio button control. Declared in PDFAnnotationButtonWidget. Declared in PDFAnnotationButtonWidget. kPDFWidgetCheckBoxControl = 2 }. kPDFWidgetCheckBoxControl Check box control.h. All Rights Reserved.4 and later. Declared in PDFAnnotationButtonWidget.4 and later.4 and later. 61 . 2007 Apple Inc. enum { kPDFWidgetUnknownControl = -1. kPDFWidgetPushButtonControl = 0. kPDFWidgetRadioButtonControl = 1.4 and later.PDFAnnotationButtonWidget Class Reference Constants typedef NSInteger PDFWidgetControlType. Available in OS X v10. Declared in PDFAnnotationButtonWidget. Constants kPDFWidgetUnknownControl Unknown control type. Available in OS X v10.h.h. 2007-12-11 | © 2004.h.

2007 Apple Inc. This is because PDFView automatically handles hit testing for you. All Rights Reserved.5 and later. – setStringValue: 2007-12-11 | © 2004. Tasks Getting and Setting the String Value – stringValue (page 69) Returns the selection in the widget annotation. If you use a PDFAnnotationChoiceWidget object.PDFAnnotationChoiceWidget Class Reference Inherits from Conforms to PDFAnnotation : NSObject NSCopying NSCopying (PDFAnnotation) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. your application must handle hit testing. 62 . in the form of pop-up menus and lists. PDF Annotation Editor Overview A PDFAnnotationChoiceWidget object provides user interactivity on a page of a PDF document. PDFAnnotationChoiceWidget inherits general annotation behavior from the PDFAnnotation class.framework/Frameworks/PDFKit. (page 68) Sets the selection in the widget annotation. unless you are simply using PDFView to display content.framework PDFKit/PDFAnnotationChoiceWidget.h Available in OS X v10.

(page 66) Sets the background color of the widget annotation. (page 65) Returns the font color used to display the text in the widget annotation. (page 67) Sets the font used to display the text in the widget annotation. – setIsListChoice: Accessing the Items in the Choice Widget Annotation – choices (page 64) Returns an array of strings that represent the items available in the list or pop-up menu of the choice widget annotation. (page 68) Sets the font color used to display the text in the widget annotation. 2007-12-11 | © 2004. (page 67) Sets the internal field name associated with the widget annotation’s value. 2007 Apple Inc.PDFAnnotationChoiceWidget Class Reference Tasks Managing Font and Background Color Characteristics – backgroundColor (page 64) Returns the color of the widget annotation background. – setFieldName: Determining the Type of Choice Widget Annotation – isListChoice (page 66) Returns a Boolean value indicating whether the widget annotation is a list. 63 . – setBackgroundColor: – font – setFont: – fontColor – setFontColor: Managing the Associated Field Name – fieldName (page 64) Returns the internal field name associated with the widget annotation. (page 65) Returns the font used to display the text in the widget annotation. All Rights Reserved. (page 68) Sets whether the widget annotation is a list.

Availability Available in OS X v10. .(NSColor *)backgroundColor Return Value The color of the widget annotation background. Availability Available in OS X v10. Declared in PDFAnnotationChoiceWidget.5 and later. 2007-12-11 | © 2004.5 and later.PDFAnnotationChoiceWidget Class Reference Instance Methods – setChoices: (page 66) Sets the items available in the list or pop-up menu of the choice widget annotation.h choices Returns an array of strings that represent the items available in the list or pop-up menu of the choice widget annotation.h fieldName Returns the internal field name associated with the widget annotation. Instance Methods backgroundColor Returns the color of the widget annotation background. Declared in PDFAnnotationChoiceWidget.(NSArray *)choices Return Value An array of strings that represent the items in the list or pop-up menu choice widget annotation. All Rights Reserved. . 2007 Apple Inc. 64 .

2007 Apple Inc. 65 .h fontColor Returns the font color used to display the text in the widget annotation.h font Returns the font used to display the text in the widget annotation. it can associate an optional field name with a value or other data.(NSColor *)fontColor Return Value The color of the font used for the text in the widget annotation.h 2007-12-11 | © 2004. All Rights Reserved. Declared in PDFAnnotationChoiceWidget.5 and later. . Declared in PDFAnnotationChoiceWidget. Availability Available in OS X v10.(NSFont *)font Return Value The font used to display the text in the widget annotation. . Availability Available in OS X v10.(NSString *)fieldName Return Value The internal field name associated with the widget annotation.PDFAnnotationChoiceWidget Class Reference Instance Methods . Discussion If the widget annotation is backed by PDF form data. Declared in PDFAnnotationChoiceWidget.5 and later.5 and later. Availability Available in OS X v10.

. .(void)setChoices:(NSArray *)options 2007-12-11 | © 2004. Declared in PDFAnnotationChoiceWidget.(BOOL)isListChoice Return Value YES if the widget annotation is a list. 2007 Apple Inc.h setChoices: Sets the items available in the list or pop-up menu of the choice widget annotation.(void)setBackgroundColor:(NSColor *)color Parameters color The color to use in the background of the widget annotation. Discussion A choice widget annotation can be either a list or a pop-up menu. Availability Available in OS X v10.PDFAnnotationChoiceWidget Class Reference Instance Methods isListChoice Returns a Boolean value indicating whether the widget annotation is a list. All Rights Reserved. . Availability Available in OS X v10.h setBackgroundColor: Sets the background color of the widget annotation.5 and later. NO otherwise.5 and later. Declared in PDFAnnotationChoiceWidget. 66 .

(void)setFieldName:(NSString *)name Parameters name The name to be used as the internal field name associated with the widget annotation. Availability Available in OS X v10.(void)setFont:(NSFont *)font Parameters font The font to be used for the text in the widget annotation. .5 and later. it can associate an optional field name with a value or other data.5 and later.h setFont: Sets the font used to display the text in the widget annotation. All Rights Reserved. Discussion If the widget annotation is backed by PDF form data. Availability Available in OS X v10. Declared in PDFAnnotationChoiceWidget. 67 . . 2007-12-11 | © 2004.PDFAnnotationChoiceWidget Class Reference Instance Methods Parameters options Send an array of strings. 2007 Apple Inc.h setFieldName: Sets the internal field name associated with the widget annotation’s value. Declared in PDFAnnotationChoiceWidget. Availability Available in OS X v10. each of which represents an item in the list or pop-up menu of the choice annotation widget.5 and later.

5 and later.h setFontColor: Sets the font color used to display the text in the widget annotation. .h setIsListChoice: Sets whether the widget annotation is a list. 2007-12-11 | © 2004.(void)setIsListChoice:(BOOL)isList Parameters isList Send YES to set the choice widget annotation is a list. NO otherwise. All Rights Reserved.(void)setFontColor:(NSColor *)color Parameters color The color of the font to be used for the text in the widget annotation. Declared in PDFAnnotationChoiceWidget.5 and later.PDFAnnotationChoiceWidget Class Reference Instance Methods Declared in PDFAnnotationChoiceWidget.h setStringValue: Sets the selection in the widget annotation. Discussion A choice widget annotation can be either a list or a pop-up menu. Availability Available in OS X v10. . 68 . Declared in PDFAnnotationChoiceWidget. 2007 Apple Inc. Availability Available in OS X v10.

Availability Available in OS X v10.h stringValue Returns the selection in the widget annotation. Availability Available in OS X v10. Declared in PDFAnnotationChoiceWidget.(NSString *)stringValue Return Value The string that represents the selection in the widget annotation.PDFAnnotationChoiceWidget Class Reference Instance Methods . . Discussion If the widget annotation object is backed by PDF form data.(void)setStringValue:(NSString *)value Parameters value The string that represents the selection in the widget annotation. if possible.5 and later. Declared in PDFAnnotationChoiceWidget. this method updates the value associated with the appropriate field in the form object. All Rights Reserved. this method returns the value associated with the appropriate field in the form object. 2007 Apple Inc.h 2007-12-11 | © 2004. 69 . Discussion If the widget annotation object is backed by PDF form data.5 and later.

The setLineWidth: (page 119) and setStyle: (page 120) methods of the annotation’s associated PDFBorder object determines the stroke thickness and style.PDFAnnotationCircle Class Reference Inherits from Conforms to PDFAnnotation : NSObject NSCopying NSCopying (PDFAnnotation) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. The setColor: (page 42) method of the PDFAnnotation class determines the stroke color. Circle annotations are like square annotations (instances of the PDFAnnotationSquare class) apart from the shape. (page 71) Sets the fill color used for drawing the annotation.h Available in OS X v10. – setInteriorColor: 2007-12-11 | © 2004. PDF Annotation Editor Overview A PDFAnnotationCircle object displays an ellipse on a page.framework PDFKit/PDFAnnotationCircle.framework/Frameworks/PDFKit.4 and later. Tasks Accessor Methods – interiorColor (page 71) Returns the fill color used for drawing the annotation. 2007 Apple Inc. 70 . All Rights Reserved.

4 and later. See Also – setInteriorColor: (page 71) Declared in PDFAnnotationCircle. . . 71 . See Also – interiorColor (page 71) Declared in PDFAnnotationCircle.4 and later.PDFAnnotationCircle Class Reference Instance Methods Instance Methods interiorColor Returns the fill color used for drawing the annotation.h setInteriorColor: Sets the fill color used for drawing the annotation. 2007 Apple Inc.(void)setInteriorColor:(NSColor *)color Availability Available in OS X v10.h 2007-12-11 | © 2004.(NSColor *)interiorColor Availability Available in OS X v10. All Rights Reserved.

72 .framework/Frameworks/PDFKit. The PDFAnnotation class’s contents (page 36) and setContents: (page 42) methods let you get and set the textual content for a PDFAnnotationFreeText object. PDF Annotation Editor Overview A PDFAnnotationFreeText object displays text on a page.PDFAnnotationFreeText Class Reference Inherits from Conforms to PDFAnnotation : NSObject NSCopying NSCopying (PDFAnnotation) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. Unlike a PDFAnnotationText object.framework PDFKit/PDFAnnotationFreeText. a PDFAnnotationFreeText object has no open or closed state. – setAlignment: 2007-12-11 | © 2004.h Available in OS X v10.4 and later. its text is always visible. 2007 Apple Inc. All Rights Reserved. (page 74) Sets the horizontal alignment of text within the bounds of the annotation. Tasks Managing Text Alignment – alignment (page 73) Returns the horizontal alignment of text within the bounds of the annotation. The text annotation performed in Preview uses PDFAnnotationFreeText.

h font Returns the font used for the annotation’s text field. See Also – setAlignment: (page 74) Declared in PDFAnnotationFreeText. Availability Available in OS X v10. . and NSCenterTextAlignment. . (page 75) Sets the font used in the text field of the annotation.4 and later. – setFont: – fontColor – setFontColor: Instance Methods alignment Returns the horizontal alignment of text within the bounds of the annotation. 73 . (page 74) Returns the font color used in the text field of the annotation. NSRightTextAlignment.PDFAnnotationFreeText Class Reference Instance Methods Managing Font and Font Color – font (page 73) Returns the font used for the annotation’s text field. 2007 Apple Inc.(NSFont *)font Return Value The font used for the annotation’s text field. 2007-12-11 | © 2004. All Rights Reserved.(NSTextAlignment)alignment Return Value The horizontal alignment of text within the bounds of the annotation. (page 75) Sets the font color used in the text field of the annotation. Supported values are NSLeftTextAlignment.

(NSColor *)fontColor Return Value The font color used in the text field of the annotation. Availability Available in OS X v10.h setAlignment: Sets the horizontal alignment of text within the bounds of the annotation.(void)setAlignment:(NSTextAlignment)alignment Parameters alignment Send NSLeftTextAlignment. NSRightTextAlignment.5 and later. See Also – setFontColor: Declared in PDFAnnotationFreeText. . Availability Available in OS X v10.4 and later.4 and later. 74 . See Also – setFont: (page 75) Declared in PDFAnnotationFreeText. All Rights Reserved. . or NSCenterTextAlignment to set the horizontal alignment of text within the bounds of the annotation.PDFAnnotationFreeText Class Reference Instance Methods Availability Available in OS X v10.h fontColor Returns the font color used in the text field of the annotation. 2007 Apple Inc. See Also – alignment (page 73) 2007-12-11 | © 2004.

.(void)setFontColor:(NSColor *)color Parameters color The font color to be used in the text field of the annotation.PDFAnnotationFreeText Class Reference Instance Methods Declared in PDFAnnotationFreeText.(void)setFont:(NSFont *)font Parameters font The font to be used in the text field of the annotation. All Rights Reserved.h 2007-12-11 | © 2004. . 75 . See Also – fontColor Declared in PDFAnnotationFreeText.h setFont: Sets the font used in the text field of the annotation. 2007 Apple Inc.5 and later.h setFontColor: Sets the font color used in the text field of the annotation. Availability Available in OS X v10.4 and later. See Also – font (page 73) Declared in PDFAnnotationFreeText. Availability Available in OS X v10.

framework PDFKit/PDFAnnotationInk. 76 . PDF Annotation Editor Overview A PDFAnnotationInk object displays one or more disjoint Bezier paths on a page.framework/Frameworks/PDFKit. 2007 Apple Inc.h Available in OS X v10. The setColor: (page 42) method of the PDFAnnotation class determines the stroke color. The setLineWidth: (page 119) and setStyle: (page 120) methods of the annotation’s associated PDFBorder object determines the stroke thickness and style.4 and later. This is typically used to represent a freehand jotting or “scribble” of handwritten text.PDFAnnotationInk Class Reference Inherits from Conforms to PDFAnnotation : NSObject NSCopying NSCopying (PDFAnnotation) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. 2007-12-11 | © 2004. Tasks Accessor Methods – paths (page 77) Returns an array containing the Bezier paths that make up an annotation. All Rights Reserved.

.4 and later. (page 78) Removes a Bezier path from an annotation.(NSArray *)paths Availability Available in OS X v10.h paths Returns an array containing the Bezier paths that make up an annotation. 2007 Apple Inc.h 2007-12-11 | © 2004. . – removeBezierPath: Instance Methods addBezierPath: Adds a Bezier path to an annotation. See Also (page 77) – removeBezierPath: (page 78) – addBezierPath: Declared in PDFAnnotationInk.(void)addBezierPath:(NSBezierPath *)path Availability Available in OS X v10. 77 . See Also – removeBezierPath: – paths (page 78) (page 77) Declared in PDFAnnotationInk. All Rights Reserved.PDFAnnotationInk Class Reference Instance Methods Working with Bezier Paths – addBezierPath: (page 77) Adds a Bezier path to an annotation.4 and later.

. All Rights Reserved.4 and later. See Also – addBezierPath: – paths (page 77) (page 77) Declared in PDFAnnotationInk.h 2007-12-11 | © 2004.(void)removeBezierPath:(NSBezierPath *)path Availability Available in OS X v10.PDFAnnotationInk Class Reference Instance Methods removeBezierPath: Removes a Bezier path from an annotation. 2007 Apple Inc. 78 .

PDF Annotation Editor Overview A PDFAnnotationLine object displays a single line on a page. (page 83) Sets the starting point for the line.framework/Frameworks/PDFKit.framework PDFKit/PDFAnnotationLine.PDFAnnotationLine Class Reference Inherits from Conforms to PDFAnnotation : NSObject NSCopying NSCopying (PDFAnnotation) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. 79 . (page 81) Returns the ending point for the line in page space. The setColor: (page 42) method of the PDFAnnotation class determines the stroke color. The setLineWidth: (page 119) and setStyle: (page 120) methods of the annotation’s associated PDFBorder object determines the stroke thickness and style. 2007 Apple Inc.4 and later. All Rights Reserved. Tasks Specifying the Starting and Ending Points – startPoint (page 84) Returns the starting point for the line. – setStartPoint: – endPoint 2007-12-11 | © 2004.h Available in OS X v10.

. (page 82) Sets the line ending style for the ending point of the line. 2007-12-11 | © 2004. 80 . All Rights Reserved. – setStartLineStyle: – endLineStyle – setEndLineStyle: Specifying the Color of Line-end Ornaments – interiorColor (page 81) Returns the color used to fill the ornament at the ends of the line.(PDFLineStyle)endLineStyle Return Value The line ending style for the ending point of the line.PDFAnnotationLine Class Reference Instance Methods – setEndPoint: (page 82) Sets the ending point for the line. Specifying the Line Ending Styles – startLineStyle (page 84) Returns the line ending style for the starting point of the line. (page 83) Sets the line ending style for the starting point of the line. 2007 Apple Inc.4 and later. (page 80) Returns the line ending style for the ending point of the line. (page 83) Sets the color used to fill the ornament at the ends of the line. – setInteriorColor: Instance Methods endLineStyle Returns the line ending style for the ending point of the line. Availability Available in OS X v10.

2007 Apple Inc.h interiorColor Returns the color used to fill the ornament at the ends of the line.h endPoint Returns the ending point for the line in page space. Availability Available in OS X v10. Discussion Page space is a 72-dpi coordinate system with the origin at the lower-left corner of the current page. See Also (page 82) – startPoint (page 84) – setEndPoint: Declared in PDFAnnotationLine.(NSPoint)endPoint Return Value The ending point for the line.(NSColor *) interiorColor Return Value The color used in the line-end ornament at the ends of the line.h 2007-12-11 | © 2004. in page space. .PDFAnnotationLine Class Reference Instance Methods See Also (page 82) – startLineStyle (page 84) – setEndLineStyle: Declared in PDFAnnotationLine.5 and later.4 and later. All Rights Reserved. 81 . Availability Available in OS X v10. Declared in PDFAnnotationLine. .

. Availability Available in OS X v10.4 and later. in page space.PDFAnnotationLine Class Reference Instance Methods setEndLineStyle: Sets the line ending style for the ending point of the line.4 and later. All Rights Reserved.h setEndPoint: Sets the ending point for the line. . Discussion Page space is a 72-dpi coordinate system with the origin at the lower-left corner of the current page.h 2007-12-11 | © 2004. 2007 Apple Inc.(void)setEndPoint:(NSPoint)point Parameters point The ending point for the line. 82 . Availability Available in OS X v10.(void)setEndLineStyle:(PDFLineStyle)style Parameters style The line ending style for the ending point of the line. See Also (page 80) – setStartLineStyle: (page 83) – endLineStyle Declared in PDFAnnotationLine. See Also (page 81) – setStartPoint: (page 83) – endPoint Declared in PDFAnnotationLine.

. .(void)setStartLineStyle:(PDFLineStyle)style Parameters style Availability Available in OS X v10.h setStartLineStyle: Sets the line ending style for the starting point of the line.5 and later. 2007 Apple Inc. All Rights Reserved.h setStartPoint: Sets the starting point for the line. Declared in PDFAnnotationLine. .4).(void)setStartPoint:(NSPoint)point 2007-12-11 | © 2004.4 and later. see the Adobe PDF Specification 1. 83 . Availability Available in OS X v10. Discussion The ornament at the end of a line is optional (for more information. See Also (page 84) – setEndLineStyle: (page 82) – startLineStyle Declared in PDFAnnotationLine.PDFAnnotationLine Class Reference Instance Methods setInteriorColor: Sets the color used to fill the ornament at the ends of the line.(void)setInteriorColor:(NSColor *)color Parameters color The color to be used to fill in the ornament at the ends of the line.

See Also (page 84) – setEndPoint: (page 82) – startPoint Declared in PDFAnnotationLine. in page space. All Rights Reserved.4 and later.(PDFLineStyle)startLineStyle Return Value The line ending style for the starting point of the line. 2007 Apple Inc.h startPoint Returns the starting point for the line.h startLineStyle Returns the line ending style for the starting point of the line. 84 .(NSPoint)startPoint 2007-12-11 | © 2004.4 and later. . See Also – setStartLineStyle: – endLineStyle (page 83) (page 80) Declared in PDFAnnotationLine. . Availability Available in OS X v10.PDFAnnotationLine Class Reference Instance Methods Parameters point The starting point for the line. Discussion Page space is a 72-dpi coordinate system with the origin at the lower-left corner of the current page. Availability Available in OS X v10.

Declared in PDFAnnotationLine. Declared in PDFAnnotationLine.4 and later. kPDFLineStyleDiamond A diamond-shaped line ending filled with the annotation’s interior color. Discussion Page space is a 72-dpi coordinate system with the origin at the lower-left corner of the current page. Declared in PDFAnnotationLine.h Constants The following constants specify the available line ending styles: Constant Description kPDFLineStyleNone No line ending. if any. if any.h.h.4 and later.4 and later. Available in OS X v10. if any.4 and later. Available in OS X v10.h. 2007 Apple Inc.4 and later. 85 . Available in OS X v10. 2007-12-11 | © 2004. Declared in PDFAnnotationLine. All Rights Reserved. Availability Available in OS X v10. kPDFLineStyleCircle A circular line ending filled with the annotation’s interior color. in page space. kPDFLineStyleSquare A square line ending filled with the annotation’s interior color.PDFAnnotationLine Class Reference Constants Return Value The starting point for the line.h. See Also – setStartPoint: – endPoint (page 83) (page 81) Declared in PDFAnnotationLine. Available in OS X v10.

4 and later.h. composed from two short lines meeting in an acute angle at the line end. Declared in PDFAnnotationLine. 2007 Apple Inc.h. Declared in PDFAnnotationLine.PDFAnnotationLine Class Reference Constants Constant Description kPDFLineStyleOpenArrow An open arrowhead line ending. kPDFLineStyleClosedArrow A closed arrowhead line ending. Available in OS X v10. Available in OS X v10. 2007-12-11 | © 2004. 86 .4 and later. consisting of a triangle with the acute vertex at the line end and filled with the annotation’s interior color. if any. All Rights Reserved.

4 and later.PDFAnnotationLink Class Reference Inherits from Conforms to PDFAnnotation : NSObject NSCopying NSCopying (PDFAnnotation) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. 2007 Apple Inc.framework/Frameworks/PDFKit. (page 88) Sets the destination for the link as a PDFDestination object.framework PDFKit/PDFAnnotationLink. – setDestination: – URL 2007-12-11 | © 2004. 87 . (page 89) Gets the destination for the link when the destination was specified as a URL. Link Snoop PDF Annotation Editor Overview A PDFAnnotationLink object represents either a hypertext link to another location in the document (specified as a PDFDestination object) or a URL. All Rights Reserved.h Available in OS X v10. Tasks Working with Link Destinations – destination (page 88) Gets the destination for the link when the destination was specified as a PDFDestination object.

h setDestination: Sets the destination for the link as a PDFDestination object. See Also – destination (page 88) Declared in PDFAnnotationLink.4 and later.PDFAnnotationLink Class Reference Instance Methods – setURL: (page 89) Sets the destination for the link as a URL. .4 and later. All Rights Reserved. . Highlighting the Link – setHighlighted: (page 89) Sets the highlighting state for the link. 88 .h 2007-12-11 | © 2004.(PDFDestination *)destination Availability Available in OS X v10. Instance Methods destination Gets the destination for the link when the destination was specified as a PDFDestination object.(void)setDestination:(PDFDestination *)destination Availability Available in OS X v10. 2007 Apple Inc. See Also – setDestination: (page 88) Declared in PDFAnnotationLink.

when a user clicks (mouse-down) on a link. . set highlighting to NO and redraw again. Declared in PDFAnnotationLink.(NSURL *)URL Availability Available in OS X v10.PDFAnnotationLink Class Reference Instance Methods setHighlighted: Sets the highlighting state for the link.h setURL: Sets the destination for the link as a URL. See Also – setURL: (page 89) 2007-12-11 | © 2004.(void)setURL:(NSURL *)url Availability Available in OS X v10.4 and later.4 and later. On the subsequent mouse-up event. 89 .4 and later. . All Rights Reserved.h URL Gets the destination for the link when the destination was specified as a URL. set highlighting to YES and redraw the link. .(void)setHighlighted:(BOOL)flag Discussion For typical PDF interaction. 2007 Apple Inc. See Also – URL (page 89) Declared in PDFAnnotationLink. Availability Available in OS X v10.

h 2007-12-11 | © 2004. 2007 Apple Inc.PDFAnnotationLink Class Reference Instance Methods Declared in PDFAnnotationLink. 90 . All Rights Reserved.

PDFAnnotationMarkup Class Reference

Inherits from Conforms to

PDFAnnotation : NSObject NSCopying NSCopying (PDFAnnotation) NSObject (NSObject)

Framework Declared in Availability Related sample code

Library/Frameworks/Quartz.framework/Frameworks/PDFKit.framework PDFKit/PDFAnnotationMarkup.h Available in OS X v10.4 and later. PDF Annotation Editor

Overview
A PDFAnnotationMarkup object appears as highlighting, underlining, or a strikethrough style applied to the text of a document. The setLineWidth: (page 119) and setStyle: (page 120) methods of the annotation’s associated PDFBorder object determines the stroke thickness and style. The setColor: (page 42) method of the PDFAnnotation class determines the stroke color.

Tasks
Working with Markup Boundaries
– quadrilateralPoints

(page 92) Gets the array of quadrilateral points defining the bounds of the markup. (page 93) Sets the array of quadrilateral points defining the bounds of the markup.

– setQuadrilateralPoints:

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

91

PDFAnnotationMarkup Class Reference Instance Methods

Working with Markup Style
– markupType

(page 92) Gets the markup style. (page 93) Sets the markup style.

– setMarkupType:

Instance Methods
markupType
Gets the markup style.
- (PDFMarkupType)markupType

Discussion Refer to “Constants” (page 94) for the available markup styles. Availability Available in OS X v10.4 and later. See Also
– setMarkupType:

(page 93)

Declared in
PDFAnnotationMarkup.h

quadrilateralPoints
Gets the array of quadrilateral points defining the bounds of the markup.
- (NSArray *)quadrilateralPoints

Discussion Each quadrilateral encompasses a word or a contiguous group of words. The quadrilateral points are ordered counterclockwise, with the first point closest to the origin in page space. Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

92

PDFAnnotationMarkup Class Reference Instance Methods

Availability Available in OS X v10.4 and later. See Also
– setQuadrilateralPoints:

(page 93)

Declared in
PDFAnnotationMarkup.h

setMarkupType:
Sets the markup style.
- (void)setMarkupType:(PDFMarkupType)type

Discussion Refer to “Constants” (page 94) for the available markup styles. Availability Available in OS X v10.4 and later. See Also
– markupType

(page 92)

Declared in
PDFAnnotationMarkup.h

setQuadrilateralPoints:
Sets the array of quadrilateral points defining the bounds of the markup.
- (void)setQuadrilateralPoints:(NSArray *)points

Discussion The points defined by each quadrilateral array should encompass a word or a contiguous group of words. The quadrilateral points are ordered counterclockwise, with the first point closest to the origin in page space. Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. Availability Available in OS X v10.4 and later. See Also
– quadrilateralPoints

(page 92)

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

93

PDFAnnotationMarkup Class Reference Constants

Declared in
PDFAnnotationMarkup.h

Constants
The styles available for markup annotations in PDF Kit:
Constant Description

kPDFMarkupTypeHighlight Highlight style for the markup.

Available in OS X v10.5 and later. Declared in
PDFAnnotationMarkup.h. kPDFMarkupTypeStrikeOut Strikethrough style for the markup.

Available in OS X v10.5 and later. Declared in
PDFAnnotationMarkup.h. kPDFMarkupTypeUnderline Underline style for the markup.

Available in OS X v10.5 and later. Declared in
PDFAnnotationMarkup.h.

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

94

PDFAnnotationPopup Class Reference

Inherits from Conforms to

PDFAnnotation : NSObject NSCopying NSCopying (PDFAnnotation) NSObject (NSObject)

Framework Declared in Availability Related sample code

Library/Frameworks/Quartz.framework/Frameworks/PDFKit.framework PDFKit/PDFAnnotationPopup.h Available in OS X v10.5 and later. PDF Annotation Editor

Overview
A PDFAnnotationPopup object provides user interactivity on a PDF page in the form of a pop-up menu.

Tasks
Accessing and Setting the Open State
– isOpen

(page 96) Returns a Boolean value indicating whether the pop-up is open. (page 96) Sets the open state of the pop-up menu.

– setIsOpen:

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

95

Availability Available in OS X v10. . .h setIsOpen: Sets the open state of the pop-up menu. 2007 Apple Inc. See Also – setIsOpen: (page 96) Declared in PDFAnnotationPopup.h 2007-12-11 | © 2004. NO otherwise. All Rights Reserved. 96 .5 and later.5 and later. See Also – isOpen (page 96) Related Sample Code PDF Annotation Editor Declared in PDFAnnotationPopup.PDFAnnotationPopup Class Reference Instance Methods Instance Methods isOpen Returns a Boolean value indicating whether the pop-up is open. Availability Available in OS X v10.(BOOL)isOpen Return Value YES if the pop-up is open. NO otherwise.(void)setIsOpen:(BOOL)isOpen Parameters isOpen Pass YES to set the pop-up menu to open.

PDFAnnotationSquare Class Reference Inherits from Conforms to PDFAnnotation : NSObject NSCopying NSCopying (PDFAnnotation) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz.4 and later. The setColor: (page 42) method of the PDFAnnotation class determines the stroke color. Square annotations are like circle annotations (instances of the PDFAnnotationCircle class) apart from the shape. The setLineWidth: (page 119) and setStyle: (page 120) methods of the annotation’s associated PDFBorder object determines the stroke thickness and style.framework/Frameworks/PDFKit. Tasks Accessor Methods – interiorColor (page 98) Gets the fill color used for drawing the annotation.framework PDFKit/PDFAnnotationSquare. 2007 Apple Inc. – setInteriorColor: 2007-12-11 | © 2004. (page 98) Sets the fill color used for drawing the annotation. 97 . PDF Annotation Editor Overview A PDFAnnotationSquare object displays a rectangle on a page. All Rights Reserved.h Available in OS X v10.

4 and later. .4 and later. See Also – setInteriorColor: (page 98) Declared in PDFAnnotationSquare.h setInteriorColor: Sets the fill color used for drawing the annotation. . See Also – interiorColor (page 98) Declared in PDFAnnotationSquare. 2007 Apple Inc. All Rights Reserved. 98 .h 2007-12-11 | © 2004.PDFAnnotationSquare Class Reference Instance Methods Instance Methods interiorColor Gets the fill color used for drawing the annotation.(NSColor *)interiorColor Availability Available in OS X v10.(void)setInteriorColor:(NSColor *)color Availability Available in OS X v10.

framework/Frameworks/PDFKit. Tasks Accessing and Setting the Stamp Annotation – name (page 100) Returns name associated with the stamp annotation. such as “Confidential. – setName: 2007-12-11 | © 2004.PDFAnnotationStamp Class Reference Inherits from Conforms to PDFAnnotation : NSObject NSCopying NSCopying (PDFAnnotation) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. 2007 Apple Inc. PDF Annotation Editor Overview A PDFAnnotationStamp object allows you to display a word or phrase.h Available in OS X v10. A PDFAnnotationStamp object should have an appearance stream associated with it. (page 100) Sets the name associated with the stamp annotation. 99 .“ in a PDF page.5 and later. All Rights Reserved. nothing useful is rendered.framework PDFKit/PDFAnnotationStamp. otherwise.

a stamp annotation that displays “Confidential” on a PDF page may not have a name value of “Confidential” . 100 . .(NSString *)setName:(NSString *)name Discussion The name must be representable in ASCII. Availability Available in OS X v10. Availability Available in OS X v10.5 and later. For example. You can set a stamp annotation’s name to help you identify it. See Also – setName: Declared in PDFAnnotationStamp.5 and later.h 2007-12-11 | © 2004. . See Also – name Declared in PDFAnnotationStamp. All Rights Reserved.h setName: Sets the name associated with the stamp annotation. 2007 Apple Inc. in the appearance stream for the annotation. You must provide the string you want displayed on the page.(NSString *)name Discussion Note that the name value of the stamp annotation is not necessarily identical to the user-visible appearance of the stamp annotation. but that name is not displayed on the PDF page.PDFAnnotationStamp Class Reference Instance Methods Instance Methods name Returns name associated with the stamp annotation. such as “Draft” or “Top Secret” .

text annotations do not scale and rotate with the page. Currently.) 2007-12-11 | © 2004. 2007 Apple Inc. (Deprecated. Note that your application must do the work to put up a window containing the text in response to a PDFViewAnnotationHitNotification (page 253). Each PDFAnnotationText object has a PDFAnnotationPopup object associated with it.PDFAnnotationText Class Reference Inherits from Conforms to PDFAnnotation : NSObject NSCopying NSCopying (PDFAnnotation) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. Call isOpen (page 96) on the annotation’s pop-up instead.h Available in OS X v10.4 and later. it displays as a pop-up window containing the text of the note. In its closed state. 101 . In its open state. the annotation appears as an icon.framework PDFKit/PDFAnnotationText.framework/Frameworks/PDFKit. Tasks Managing the Annotation’s State – windowIsOpen (page 103) Returns a Boolean value indicating whether the annotation’s note window is open. PDF Annotation Editor Overview A PDFAnnotationText object displays as an icon (such as a “sticky note”) attached to a specified point in the PDF document. All Rights Reserved.

PDFAnnotationText Class Reference Instance Methods – setWindowIsOpen: (page 103) Sets the open/closed state of the annotation to the specified value. (page 102) Sets the icon type for the annotation. – setIconType: Instance Methods iconType Returns the icon type for the annotation.4 and later.(void)setIconType:(PDFTextAnnotationIconType)type 2007-12-11 | © 2004. .h setIconType: Sets the icon type for the annotation. 102 . 2007 Apple Inc. See “Constants” (page 104) for a list of possible return values.(PDFTextAnnotationIconType)iconType Return Value The icon type of the annotation. Call setIsOpen: (page 96) on the annotation’s pop-up instead. All Rights Reserved.) Managing the Annotation Icon’s Type – iconType (page 102) Returns the icon type for the annotation. . See Also – setIconType: (page 102) Declared in PDFAnnotationText. Availability Available in OS X v10. (Deprecated.

All Rights Reserved. (Deprecated. (Deprecated.PDFAnnotationText Class Reference Instance Methods Parameters type The icon type for the annotation. 2007 Apple Inc. Availability Available in OS X v10.4 and later.) .) .h windowIsOpen Returns a Boolean value indicating whether the annotation’s note window is open. 103 . Use it to record annotation state. Call setIsOpen: (page 96) on the annotation’s pop-up instead. See Also – windowIsOpen (page 103) Declared in PDFAnnotationText. 2007-12-11 | © 2004. See Also – iconType (page 102) Declared in PDFAnnotationText. Availability Available in OS X v10.(void)setWindowIsOpen:(BOOL)isOpen Discussion This method does not actually open or close the annotation.(BOOL)windowIsOpen Availability Available in OS X v10.h setWindowIsOpen: Sets the open/closed state of the annotation to the specified value. See “Constants” (page 104) for a list of the available icon types.4 and later. Call isOpen (page 96) on the annotation’s pop-up instead.4 and later.

All Rights Reserved. Available in OS X v10. Declared in PDFAnnotationText. 104 . kPDFTextAnnotationIconKey Key annotation icon. 2007 Apple Inc.h. Available in OS X v10. Declared in PDFAnnotationText.4 and later.PDFAnnotationText Class Reference Constants See Also – setWindowIsOpen: (page 103) Declared in PDFAnnotationText. kPDFTextAnnotationIconHelp Help annotation icon. Declared in PDFAnnotationText.h. kPDFTextAnnotationIconNote Note annotation icon.h.h Constants Text annotations can use the following icon types: Constant Description kPDFTextAnnotationIconComment Comment annotation icon. Available in OS X v10. 2007-12-11 | © 2004.4 and later. Available in OS X v10.h.4 and later.4 and later. Available in OS X v10. kPDFTextAnnotationIconNewParagraph New Paragraph annotation icon.4 and later.h. Declared in PDFAnnotationText. Declared in PDFAnnotationText.

PDFAnnotationText Class Reference Constants Constant Description kPDFTextAnnotationIconParagraph Paragraph annotation icon.h. Declared in PDFAnnotationText. Available in OS X v10.4 and later.4 and later.h. 2007-12-11 | © 2004. kPDFTextAnnotationIconInsert Insert annotation icon. 2007 Apple Inc. Available in OS X v10. 105 . All Rights Reserved. Declared in PDFAnnotationText.

(page 114) Sets the string for the annotation. 106 . 2007 Apple Inc. All Rights Reserved. PDFAnnotationTextWidget objects support interactive forms in a PDF document.framework/Frameworks/PDFKit. Tasks Working with Annotation Strings – stringValue (page 115) Returns the string assigned to the annotation.PDFAnnotationTextWidget Class Reference Inherits from Conforms to PDFAnnotation : NSObject NSCopying NSCopying (PDFAnnotation) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. PDF Annotation Editor Overview A PDFAnnotationTextWidget object allows you to manage the appearance and content of text fields. – setStringValue: – maximumLength 2007-12-11 | © 2004. This object is comparable to an editable NSTextField in Cocoa or an edit text view in Carbon.framework PDFKit/PDFAnnotationTextWidget. (page 110) Returns the maximum number of characters allowed in the annotation string.4 and later.h Available in OS X v10.

(page 111) Sets the background color of the annotation text field. (page 113) Sets the font used in the text field of the annotation. (page 113) Sets the font color used for the annotation’s text field. 2007 Apple Inc. All Rights Reserved. 107 . (page 108) Returns the text alignment setting for the annotation. (page 110) Returns the font color used for the annotation’s text field. and Rotation – backgroundColor (page 108) Returns the background color of the annotation text field.PDFAnnotationTextWidget Class Reference Tasks – setMaximumLength: (page 113) Sets the maximum number of characters allowed in the annotation string. – setBackgroundColor: – alignment – setAlignment: – rotation – setRotation: Working with Field Names – fieldName (page 109) Returns the internal name for the annotation text field. Managing the Font and Font Color – font (page 109) Returns the font used for the annotation’s text field. – setFont: – fontColor – setFontColor: Managing Background Color. Alignment. (page 111) Sets the text alignment for the annotation. (page 114) Sets the rotation angle of the annotation text field in degrees. 2007-12-11 | © 2004. (page 110) Returns the rotation angle of the annotation text field in degrees.

All Rights Reserved.h backgroundColor Returns the background color of the annotation text field. Supported alignment values are NSLeftTextAlignment. Availability Available in OS X v10. 108 .5 and later. NSRightTextAlignment. 2007 Apple Inc. See Also – setAlignment: (page 111) Declared in PDFAnnotationTextWidget.4 and later. Availability Available in OS X v10. . See Also – setBackgroundColor: Declared in PDFAnnotationTextWidget.PDFAnnotationTextWidget Class Reference Instance Methods – setFieldName: (page 112) Sets the internal field name for the annotation text field.h 2007-12-11 | © 2004. .(NSColor *)backgroundColor Return Value The background color of the annotation’s text field.(NSTextAlignment)alignment Return Value The text alignment value for the annotation. Instance Methods alignment Returns the text alignment setting for the annotation. and NSCenterTextAlignment.

PDFAnnotationTextWidget Class Reference Instance Methods fieldName Returns the internal name for the annotation text field. When text is entered into one of the objects. the text associated with that field name is changed in all objects. .4 and later.(NSString *)fieldName Return Value The internal name for the annotation text field. See Also – setFIeldName: Declared in PDFAnnotationTextWidget.h font Returns the font used for the annotation’s text field.h 2007-12-11 | © 2004. Availability Available in OS X v10. . See Also – setFont: (page 113) Declared in PDFAnnotationTextWidget. Discussion Field names are optional. 2007 Apple Inc. All Rights Reserved. If you need to ensure unique text for a PDFAnnotationTextWidget object. 109 . Availability Available in OS X v10. Note that multiple PDFAnnotationTextWidget objects with the same field name always have the same text associated with that field name. you must give it a unique field name (you can use setFieldName: (page 112) to do this).5 and later.(NSFont *)font Return Value The font used for text in the annotation’s text field. internal names that identify text fields in a PDF form. You use field names with the PDFActionResetForm action.

h maximumLength Returns the maximum number of characters allowed in the annotation string. See Also – setFontColor: Declared in PDFAnnotationTextWidget. All Rights Reserved. Availability Available in OS X v10. .(int)rotation 2007-12-11 | © 2004. . 110 .h rotation Returns the rotation angle of the annotation text field in degrees.PDFAnnotationTextWidget Class Reference Instance Methods fontColor Returns the font color used for the annotation’s text field.(NSColor *)fontColor Return Value The font color used for text in the annotation’s text field. Availability Available in OS X v10.5 and later.(NSUInteger)maximumLength Return Value The maximum number of characters allowed in the annotations string. A return value of 0 means that there is no specified maximum. See Also – setMaximumLength: Declared in PDFAnnotationTextWidget. . 2007 Apple Inc.5 and later.

such as 0. 111 . See Also – setRotation: Declared in PDFAnnotationTextWidget.PDFAnnotationTextWidget Class Reference Instance Methods Return Value The rotation angle of the annotation text field in degrees. See Also – alignment (page 108) Declared in PDFAnnotationTextWidget.(void)setBackgroundColor:(NSColor *)color 2007-12-11 | © 2004. Availability Available in OS X v10.h setAlignment: Sets the text alignment for the annotation. Availability Available in OS X v10. 90. 2007 Apple Inc. All Rights Reserved. or 270.5 and later. Possible values are NSLeftTextAlignment. and NSCenterTextAlignment. . -90 is changed to 270.(void)setAlignment:(NSTextAlignment)alignment Parameters alignment The text-alignment value to be used for the annotation. NSRightTextAlignment. .h setBackgroundColor: Sets the background color of the annotation text field. 180. Discussion Note that the rotation value is a positive multiple of 90. The rotation of annotation text fields with negative rotation is converted to a corresponding positive rotation. For example.4 and later.

When text is entered into one of the objects. Availability Available in OS X v10.5 and later.h 2007-12-11 | © 2004. 112 . .5 and later. See Also – fieldName Declared in PDFAnnotationTextWidget.h setFieldName: Sets the internal field name for the annotation text field. All Rights Reserved. Discussion Field names are optional. internal names that identify text fields in a PDF form. You use field names with the PDFActionResetForm action. Note that multiple PDFAnnotationTextWidget objects with the same field name always have the same text associated with that field name. If you need to ensure unique text for a PDFAnnotationTextWidget object. the text associated with that field name is changed in all objects. you must give it a unique field name. Availability Available in OS X v10.PDFAnnotationTextWidget Class Reference Instance Methods Parameters color The color to be used in the background of the annotation’s text field.(void)setFieldName:(NSString *)name Parameters name The internal field name to be used for the annotation text field. 2007 Apple Inc. See Also – backgroundColor Declared in PDFAnnotationTextWidget.

(void)setFontColor:(NSColor *)color Parameters color The font color to be used in the annotation’s text field.4 and later. . . Availability Available in OS X v10.(void)setFont:(NSFont *)font Parameters font The font to be used in the annotation’s text field. 113 .5 and later. All Rights Reserved. Availability Available in OS X v10.h setMaximumLength: Sets the maximum number of characters allowed in the annotation string. See Also – fontColor Declared in PDFAnnotationTextWidget.PDFAnnotationTextWidget Class Reference Instance Methods setFont: Sets the font used in the text field of the annotation.(void)setMaximumLength:(NSUInteger)maxLen 2007-12-11 | © 2004. 2007 Apple Inc. .h setFontColor: Sets the font color used for the annotation’s text field. See Also – font (page 109) Declared in PDFAnnotationTextWidget.

2007 Apple Inc. 114 . See Also – maximumLength Declared in PDFAnnotationTextWidget. for example -90 is changed to 270).(void)setStringValue:(NSString *)value 2007-12-11 | © 2004. Availability Available in OS X v10.h setRotation: Sets the rotation angle of the annotation text field in degrees.PDFAnnotationTextWidget Class Reference Instance Methods Parameters maxLen The maximum number of characters allowed in the annotation string. See Also – rotation Declared in PDFAnnotationTextWidget. Pass 0 to indicate that there is no specified maximum. in degrees.(void)setRotation:(int)rotation Parameters rotation The rotation angle to be applied to the annotation text field. .5 and later. . The rotation angle must be a positive or negative multiple of 90 (negative angles are converted to their positive equivalents. Availability Available in OS X v10.5 and later.h setStringValue: Sets the string for the annotation. All Rights Reserved.

2007 Apple Inc. See Also – stringValue (page 115) Declared in PDFAnnotationTextWidget.h stringValue Returns the string assigned to the annotation.h 2007-12-11 | © 2004.PDFAnnotationTextWidget Class Reference Instance Methods Parameters value The string to be assigned to the annotation. . See Also – setStringValue: (page 114) Declared in PDFAnnotationTextWidget.4 and later. 115 . Availability Available in OS X v10.(NSString *)stringValue Return Value The string assigned to the annotation.4 and later. Availability Available in OS X v10. All Rights Reserved.

All Rights Reserved. – setStyle: – lineWidth – setLineWidth: 2007-12-11 | © 2004.PDFBorder Class Reference Inherits from Conforms to NSObject NSCopying NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. in points. (page 118) Gets the line width for the border. (page 119) Sets the line width (in points) for the border. when used. adds an optional border to an annotation. PDF Annotation Editor Overview A PDFBorder object.h Available in OS X v10. 116 .framework/Frameworks/PDFKit.4 and later. Tasks Working with Border Styles and Characteristics – style (page 121) Gets the border style. 2007 Apple Inc. Borders are drawn completely within the annotation rectangle.framework PDFKit/PDFBorder. (page 120) Sets the border style.

in points.h 2007-12-11 | © 2004. See Also – setDashPattern: (page 119) Declared in PDFBorder.(NSArray *)dashPattern Discussion Refer to the description for NSBezierPath for more information. (page 119) Sets the horizontal corner radius (in points) used for a rounded-rectangle border. Instance Methods dashPattern Gets the dash pattern for the border as an array of NSNumber objects.PDFBorder Class Reference Instance Methods – horizontalCornerRadius (page 118) Gets the horizontal corner radius (in points) used for a rounded-rectangle border. (page 120) Sets the vertical corner radius (in points) used for a rounded-rectangle border. . (page 119) Sets the dash pattern for the border. 117 . (page 117) Gets the dash pattern for the border as an array of NSNumber objects. All Rights Reserved.4 and later. (page 121) Gets the vertical corner radius used for a rounded-rectangle border. 2007 Apple Inc. – setHorizontalCornerRadius: – verticalCornerRadius – setVerticalCornerRadius: – dashPattern – setDashPattern: Drawing Borders – drawInRect: (page 118) Draws the border. Availability Available in OS X v10.

See Also – setLineWidth: (page 119) Related Sample Code PDF Annotation Editor Declared in PDFBorder.h lineWidth Gets the line width for the border. 2007 Apple Inc. . in points. All Rights Reserved.(void)drawInRect:(NSRect)rect Availability Available in OS X v10.PDFBorder Class Reference Instance Methods drawInRect: Draws the border.4 and later. Declared in PDFBorder.(float)lineWidth Availability Available in OS X v10. . 118 .h 2007-12-11 | © 2004.4 and later. .(float)horizontalCornerRadius Availability Available in OS X v10.h horizontalCornerRadius Gets the horizontal corner radius (in points) used for a rounded-rectangle border.4 and later. See Also – setHorizontalCornerRadius: (page 119) Declared in PDFBorder.

See Also – dashPattern (page 117) Declared in PDFBorder.(void)setHorizontalCornerRadius:(float)radius Availability Available in OS X v10. . 119 .h setLineWidth: Sets the line width (in points) for the border.PDFBorder Class Reference Instance Methods setDashPattern: Sets the dash pattern for the border. See Also – horizontalCornerRadius (page 118) Declared in PDFBorder.h setHorizontalCornerRadius: Sets the horizontal corner radius (in points) used for a rounded-rectangle border.4 and later.(void)setLineWidth:(float)width Availability Available in OS X v10. 2007-12-11 | © 2004.4 and later.4 and later. . All Rights Reserved. .(void)setDashPattern:(NSArray *)pattern Discussion Provide pattern as an array of NSNumber objects. Availability Available in OS X v10. 2007 Apple Inc. Refer to the description for NSBezierPath for more information.

All Rights Reserved.h setVerticalCornerRadius: Sets the vertical corner radius (in points) used for a rounded-rectangle border.(void)setVerticalCornerRadius:(float)radius Availability Available in OS X v10.h 2007-12-11 | © 2004. 120 . See Also – verticalCornerRadius (page 121) Declared in PDFBorder. See Also – style (page 121) Related Sample Code PDF Annotation Editor Declared in PDFBorder.4 and later. Availability Available in OS X v10. .(void)setStyle:(PDFBorderStyle)style Discussion Refer to “Constants” (page 121) for the available border styles.4 and later.PDFBorder Class Reference Instance Methods See Also – lineWidth (page 118) Related Sample Code PDF Annotation Editor Declared in PDFBorder. . 2007 Apple Inc.h setStyle: Sets the border style.

See Also – setVerticalCornerRadius: (page 120) Declared in PDFBorder.4 and later.(PDFBorderStyle)style Discussion See “Constants” (page 121) for possible return values. .h Constants PDF Kit annotation borders may have the following styles: 2007-12-11 | © 2004.PDFBorder Class Reference Constants style Gets the border style.(float)verticalCornerRadius Availability Available in OS X v10.h verticalCornerRadius Gets the vertical corner radius used for a rounded-rectangle border. Availability Available in OS X v10. All Rights Reserved. 2007 Apple Inc. See Also – setStyle: (page 120) Related Sample Code PDF Annotation Editor Declared in PDFBorder. .4 and later. 121 . in points.

4 and later.h. 122 . Declared in PDFBorder. kPDFBorderStyleInset Inset border. 2007 Apple Inc.h.h.h. Declared in PDFBorder.PDFBorder Class Reference Constants Constant Description kPDFBorderStyleSolid Solid border. 2007-12-11 | © 2004.4 and later. Available in OS X v10.4 and later.4 and later. kPDFBorderStyleDashed Dashed border. Declared in PDFBorder. All Rights Reserved. Available in OS X v10. Available in OS X v10.4 and later. Declared in PDFBorder.h. Declared in PDFBorder. Available in OS X v10. Available in OS X v10. kPDFBorderStyleUnderline Underline border. kPDFBorderStyleBeveled Beveled border.

PDFKit/PDFDestination. 2007-12-11 | © 2004.h Link Snoop PDF Annotation Editor Overview A PDFDestination object describes a point on a PDF page. you do not initialize PDFDestination objects but rather get them as either attributes of PDFAnnotationLink or PDFOutline objects. All Rights Reserved.4 and later. Tasks Initializing a Destination – initWithPage:atPoint: (page 125) Initializes the destination. 123 . or in response to the PDFView method currentDestination (page 223).framework/Frameworks/PDFKit. In typical usage.PDFDestination Class Reference Inherits from Conforms to NSObject NSCopying NSObject (NSObject) Framework Availability Declared in Related sample code Library/Frameworks/Quartz.framework Available in OS X v10. 2007 Apple Inc.

If the destination’s vertical component (or y value) is kPDFDestinationUnspecifiedValue. Discussion If destination is between the receiver’s position and the end of the document. Instance Methods compare: Returns a comparison result that indicates the location of the destination in the document. in page space. relative to the current position. relative to the current position. compare returns NSOrderedDescending. 2007-12-11 | © 2004. compare returns NSOrderedSame. that the destination refers to. if it is between the receiver’s position and the beginning of the document. indicating the position of the passed-in destination relative to the current position. if destination matches the receiver’s position. – point Getting a Relative Location – compare: (page 124) Returns a comparison result that indicates the location of the destination in the document. Return Value A comparison result. 124 . .(NSComparisonResult)compare:(PDFDestination *)destination Parameters destination The destination in the document to be located. All Rights Reserved. This method ignores the horizontal component of the destination point (the x value).PDFDestination Class Reference Instance Methods Getting Pages and Points – page (page 125) Returns the page that the destination refers to. compare returns NSOrderedAscending. compare treats the destination as if its y value is the top point on the destination page. 2007 Apple Inc. (page 126) Returns the point. Otherwise.

Discussion Specify point in page space. Typically.4 and later. 125 . All Rights Reserved. 2007-12-11 | © 2004. Availability Available in OS X v10.PDFDestination Class Reference Instance Methods An exception is raised if destination does not have a page associated with it or if its page is associated with a document other than the receiver’s document. 2007 Apple Inc. Instead. or PDFView objects. Page space is a 72-dpi coordinate system with the origin at the lower-left corner of the current page. or NULL if the object could not be initialized. you get them from PDFAnnotationLink.h initWithPage:atPoint: Initializes the destination.(id)initWithPage:(PDFPage *)page atPoint:(NSPoint)point Parameters page The page of the destination. PDFOutline.5 and later. Related Sample Code Link Snoop PDF Annotation Editor Declared in PDFDestination. Declared in PDFDestination.h page Returns the page that the destination refers to. Return Value An initialized PDFDestination instance. in page space. . Availability Available in OS X v10. point The point of the destination. there’s no need to initialize destinations.

All Rights Reserved.PDFDestination Class Reference Instance Methods .(PDFPage *)page Return Value The page referred to by the destination.h 2007-12-11 | © 2004.4 and later. Discussion Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.4 and later. in page space. that the destination refers to. . referred to by the destination. Availability Available in OS X v10. in page space. 2007 Apple Inc. 126 . See Also – point (page 126) Related Sample Code PDF Annotation Editor Declared in PDFDestination.(NSPoint)point Return Value The point. Availability Available in OS X v10.h point Returns the point. See Also – page (page 125) Related Sample Code PDF Annotation Editor Declared in PDFDestination.

2007 Apple Inc. Declared in PDFDestination.h. Available in OS X v10.PDFDestination Class Reference Constants Constants Destination Undefined Value used for unspecified destination. 127 . All Rights Reserved.5 and later. #define kPDFDestinationUnspecifiedValue FLT_MAX Constants kPDFDestinationUnspecifiedValue Unspecified value used when a destination’s actual x or y value is unimportant. 2007-12-11 | © 2004.

as do PDFSelection and PDFDestination. 128 . You can then ask for the page count. or parse selected content into an NSString object.framework/Frameworks/PDFKit. and selecting PDF data.PDFDocument Class Reference Inherits from Conforms to NSObject NSCopying NSObject (NSObject) Framework Availability Declared in Related sample code Library/Frameworks/Quartz. searching. All Rights Reserved. You initialize a PDFDocument object with PDF data or with a URL to a PDF file. PDFKit/PDFDocument. or support it. Tasks Initializing Documents – initWithData: (page 139) Initializes a PDFDocument object with the passed-in data.framework Available in OS X v10. 2007-12-11 | © 2004. add or delete pages. as are PDFPage and PDFOutline. The other utility classes are either instantiated from methods in PDFDocument. perform a find.h IKSlideshowDemo Link Snoop PDF Annotation Editor PDF Calendar Overview A PDFDocument object represents PDF data or a PDF file and defines methods for writing.4 and later. 2007 Apple Inc.

(page 143) Returns the root PDF outline object for the document. (page 141) Returns a Boolean value indicating whether the document is locked. (page 149) Returns a string representing the textual content for the entire document. (page 148) Sets the document attributes. 129 . this method returns NULL). (page 148) Sets the document’s root outline to a PDF outline object. (page 142) Returns the major version of the document. (page 143) Returns the most likely parent PDF outline object for the selection. (page 149) Attempts to unlock an encrypted document. All Rights Reserved. (page 142) Returns the minor version of the document. Accessing Document Information – documentURL (page 136) Returns the URL for the document. – majorVersion – minorVersion – string – outlineItemForSelection: – outlineRoot – documentAttributes – setDocumentAttributes: – setOutlineRoot: Managing Document Security – isEncrypted (page 141) Returns a Boolean value specifying whether the document is encrypted. – isLocked – unlockWithPassword: 2007-12-11 | © 2004. (page 136) Returns a dictionary of document metadata.PDFDocument Class Reference Tasks – initWithURL: (page 139) Initializes a PDFDocument object with the contents at the specified URL (if the URL is invalid. 2007 Apple Inc.

– writeToFile: – writeToFile:withOptions: – writeToURL: – writeToURL:withOptions: Working with Pages – pageCount (page 145) Returns the number of pages in the document. – pageAtIndex: – indexForPage: – insertPage:atIndex: – removePageAtIndex: – exchangePageAtIndex:withPageAtIndex: 2007-12-11 | © 2004.PDFDocument Class Reference Tasks – allowsCopying (page 132) Returns a Boolean value indicating whether the document allows copying of content to the Pasteboard. – allowsPrinting Writing Out the PDF Data – dataRepresentation (page 135) Returns a representation of the document as an NSData object. (page 150) Writes the document to a file at the specified path with the specified options. (page 133) Returns a Boolean value indicating whether the document allows printing. (page 138) Gets the index number for the specified page. 2007 Apple Inc. (page 144) Returns the page at the specified index number. (page 151) Writes the document to a location specified by the passed-in URL. (page 137) Swaps one page with another. All Rights Reserved. (page 151) Writes the document to the specified URL with the specified options. (page 145) Removes the page at the specified index point. (page 140) Inserts a page at the specified index point. 130 . (page 150) Writes the document to a file at the specified path.

– selectionFromPage:atPoint:toPage:atPoint: – selectionForEntireDocument Setting the Delegate – setDelegate: (page 147) Establishes the specified object as the delegate for the PDFDocument object. (page 135) Cancels a search initiated with beginFindString:withOptions: (page 133). (page 134) Asynchronously finds all instances of the specified array of strings in the document. 2007 Apple Inc. – beginFindString:withOptions: – beginFindStrings:withOptions: – findString:fromSelection:withOptions: – isFinding – cancelFindString Working with Selections – selectionFromPage:atCharacterIndex:toPage:atCharacterIndex: (page 146) Returns the specified selection based on starting and ending character indexes.PDFDocument Class Reference Tasks Managing Find Operations – findString:withOptions: (page 138) Synchronously finds all instances of the specified string in the document. (page 147) Returns the specified selection based on starting and ending points. – delegate 2007-12-11 | © 2004. 131 . (page 135) Returns the object acting as the delegate for the PDFDocument object. (page 141) Returns a Boolean value indicating whether an asynchronous find operation is in progress. (page 133) Asynchronously finds all instances of the specified string in the document. (page 146) Returns a selection representing the textual content of the entire document. (page 137) Synchronously finds the next occurance of a string after the specified selection (or before the selection if you specified NSBackwardsSearch as a search option. All Rights Reserved.

. – documentDidEndPageFind: (page 153) delegate method Called when the PDFDocumentDidEndPageFindNotification notification is posted. – documentDidEndDocumentFind: (page 153) delegate method Called when the PDFDocumentDidEndFindNotification notification is posted. Unlocking Documents – documentDidUnlock: (page 154) delegate method Called when the PDFDocumentDidUnlockNotification notification is posted. – documentDidBeginDocumentFind: (page 152) delegate method Called when the PDFDocumentDidBeginFindNotification notification is posted.PDFDocument Class Reference Instance Methods Searching Documents – didMatchString: (page 152) delegate method Called for every match found during a find operation. – documentDidBeginPageFind: (page 153) delegate method Called when the PDFDocumentDidBeginPageFindNotification notification is posted. All Rights Reserved. 2007 Apple Inc. 132 . Determining the Page Class – pageClass (page 144) Returns the class that is allocated and initialized when page objects are created for the document.(BOOL)allowsCopying 2007-12-11 | © 2004. – documentDidFindMatch: (page 154) delegate method Called when the PDFDocumentDidFindMatchNotification notification is posted. Instance Methods allowsCopying Returns a Boolean value indicating whether the document allows copying of content to the Pasteboard.

(BOOL)allowsPrinting Discussion The ability to print a PDF document is an attribute unrelated to whether the document is locked or unlocked. For more details about user and owner passwords. see the Adobe PDF specification. . It depends on the PDF permissions set by the document’s author. 2007-12-11 | © 2004. 133 .4 and later. Note that in many cases an encrypted document may still be readable by all users due to the standard empty string password. Note that in many cases an encrypted document may still be readable by all users due to the standard empty string password. It depends on the PDF permissions set by the document’s author. it is up to the application to enforce (or ignore) the permissions. 2007 Apple Inc.PDFDocument Class Reference Instance Methods Discussion The ability to copy content from a PDF document is an attribute unrelated to whether the document is locked or unlocked. it is up to the application to enforce (or ignore) the permissions.4 and later. Declared in PDFDocument. Availability Available in OS X v10. Availability Available in OS X v10. This method only determines the desired permissions setting in the PDF document. Declared in PDFDocument. This method always returns YES if the document is not encrypted.h allowsPrinting Returns a Boolean value indicating whether the document allows printing. All Rights Reserved. see the Adobe PDF specification. This method always returns YES if the document is not encrypted. This method only determines the desired permissions setting in the PDF document. For more details about user and owner passwords.h beginFindString:withOptions: Asynchronously finds all instances of the specified string in the document.

2007 Apple Inc. on each search hit. 134 . on each search hit.(void)beginFindString:(NSString *)string withOptions:(int)options Discussion This method returns immediately. See Also – beginFindString:withOptions: – findString:withOptions: – isFinding (page 138) (page 141) – cancelFindString (page 135) Declared in PDFDocument.h beginFindStrings:withOptions: Asynchronously finds all instances of the specified array of strings in the document. Availability Available in OS X v10.(void)beginFindStrings:(NSArray *)strings withOptions:(int)options. All Rights Reserved. See Also – findString:withOptions: – isFinding (page 138) (page 141) – cancelFindString (page 135) Declared in PDFDocument. It causes notifications to be issued when searching begins and ends. Discussion This method returns immediately.h 2007-12-11 | © 2004. Availability Available in OS X v10.5 and later. For options.PDFDocument Class Reference Instance Methods . refer to Searching and Comparing Strings. refer to Searching and Comparing Strings. and when the search proceeds to a new page.4 and later. and when the search proceeds to a new page. It causes notifications to be issued when searching begins and ends. . For options.

. .4 and later.(NSData *)dataRepresentation Availability Available in OS X v10. See Also (page 150) – writeToURL: (page 151) – writeToFile: Declared in PDFDocument. All Rights Reserved.(void)cancelFindString Availability Available in OS X v10. 2007 Apple Inc.(id)delegate Availability Available in OS X v10. .4 and later. See Also – setDelegate: (page 147) 2007-12-11 | © 2004. 135 .4 and later.h delegate Returns the object acting as the delegate for the PDFDocument object. See Also (page 138) – beginFindString:withOptions: (page 133) – isFinding (page 141) – findString:withOptions: Declared in PDFDocument.PDFDocument Class Reference Instance Methods cancelFindString Cancels a search initiated with beginFindString:withOptions: (page 133).h dataRepresentation Returns a representation of the document as an NSData object.

See Also – setDocumentAttributes: (page 148) Declared in PDFDocument.h 2007-12-11 | © 2004. or only some of the keys may have associated values. 2007 Apple Inc.(NSDictionary *)documentAttributes Return Value The dictionary of document metadata. The dictionary may be empty.h documentAttributes Returns a dictionary of document metadata. All Rights Reserved. See “Constants” (page 155) for a list of possible key words. Availability Available in OS X v10. .h documentURL Returns the URL for the document.(NSURL *)documentURL Return Value The URL for the document.4 and later. Declared in PDFDocument. Discussion Metadata is optional for PDF documents.PDFDocument Class Reference Instance Methods Declared in PDFDocument. 136 . Availability Available in OS X v10. may return NULL if the document was created from an NSData object. .4 and later.

If you pass NULL for the selection. See Also – pageCount – – – – (page 145) pageAtIndex: (page 144) indexForPage: (page 138) insertPage:atIndex: (page 140) removePageAtIndex: (page 145) Declared in PDFDocument. For options. 2007-12-11 | © 2004. refer to Searching and Comparing Strings. .h findString:fromSelection:withOptions: Synchronously finds the next occurance of a string after the specified selection (or before the selection if you specified NSBackwardsSearch as a search option.4 and later. All Rights Reserved.4 and later. this method returns NULL. this method begins searching from the beginning of the document (or the end.PDFDocument Class Reference Instance Methods exchangePageAtIndex:withPageAtIndex: Swaps one page with another. Availability Available in OS X v10.(void)exchangePageAtIndex:(NSUInteger)indexA withPageAtIndex:(NSUInteger)indexB Discussion This method raises an exception if either index value is out of bounds. Availability Available in OS X v10. if you specified NSBackwardsSearch). . 2007 Apple Inc. You can use this method to implement “Find Again” behavior. 137 .(PDFSelection *)findString:(NSString *)string fromSelection:(PDFSelection *)selection withOptions:(int)options Discussion Matches are returned as a PDFSelection object. If the search reaches the end (or beginning) of the document without any hits.

See Also – isFinding (page 141) (page 137) – findString:fromSelection:withOptions: Declared in PDFDocument. 138 .4 and later. All Rights Reserved. This method raises an exception and returns NSNotFound if page is not found. Availability Available in OS X v10. Availability Available in OS X v10.h findString:withOptions: Synchronously finds all instances of the specified string in the document.(NSArray *)findString:(NSString *)string withOptions:(int)options Discussion Each hit gets added to an NSArray object as a PDFSelection object.PDFDocument Class Reference Instance Methods See Also – isFinding (page 141) (page 138) – findString:withOptions: Declared in PDFDocument. . If there are no hits. For options. .4 and later. this method returns an empty array. Use this method when the complete search process will be brief and when you don’t need the flexibility or control offered by beginFindString:withOptions: (page 133). 2007-12-11 | © 2004.h indexForPage: Gets the index number for the specified page. 2007 Apple Inc. refer to Searching and Comparing Strings.(NSUInteger)indexForPage:(PDFPage *)page Discussion Indexes are zero-based.

PDFDocument Class Reference Instance Methods See Also (page 145) – pageAtIndex: (page 144) – insertPage:atIndex: (page 140) – removePageAtIndex: (page 145) – pageCount – exchangePageAtIndex:withPageAtIndex: (page 137) Related Sample Code PDF Annotation Editor Declared in PDFDocument. Availability Available in OS X v10. 2007 Apple Inc. or NULL if the object could not be initialized. . 139 .h initWithURL: Initializes a PDFDocument object with the contents at the specified URL (if the URL is invalid.4 and later.h initWithData: Initializes a PDFDocument object with the passed-in data.(id)initWithData:(NSData *)data Return Value A PDFDocument instance initialized with the passed-in PDF data. otherwise this method returns NULL. Discussion The data must be PDF data encapsulated in an NSData object. All Rights Reserved. this method returns NULL). .(id)initWithURL:(NSURL *)url 2007-12-11 | © 2004. See Also – initWithURL: (page 139) Declared in PDFDocument.

PDFDocument Class Reference Instance Methods

Return Value A PDFDocument instance initialized with the data at the passed-in URL or NULL if the object could not be initialized or if the URL is invalid. Availability Available in OS X v10.4 and later. See Also
– initWithData:

(page 139)

Declared in
PDFDocument.h

insertPage:atIndex:
Inserts a page at the specified index point.
- (void)insertPage:(PDFPage *)page atIndex:(NSUInteger)index

Discussion This method raises an exception if index is out of bounds. Be aware that a PDF viewing application might use the size of the first page in the document as representative of all page sizes when reporting the size of a document. If you need to get the actual size of an individual page, you can use boundsForBox: (page 176) (note that the size is returned in points, which are typically converted to inches or centimeters by PDF viewing applications). Availability Available in OS X v10.4 and later. See Also (page 145) (page 144) – indexForPage: (page 138) – removePageAtIndex: (page 145)
– pageCount – pageAtIndex: – exchangePageAtIndex:withPageAtIndex:

(page 137)

Related Sample Code PDF Calendar

Declared in
PDFDocument.h

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

140

PDFDocument Class Reference Instance Methods

isEncrypted
Returns a Boolean value specifying whether the document is encrypted.
- (BOOL)isEncrypted

Return Value YES if the document is encrypted, whether it is locked or unlocked; NO otherwise. Discussion If encrypted, reading the document requires a password. Encrypted documents whose password is the empty string are unlocked automatically upon opening, because PDF Kit tries the empty string as a password if none is supplied. Use the unlockWithPassword: (page 149) method to unlock a document using a password. Availability Available in OS X v10.4 and later. Declared in
PDFDocument.h

isFinding
Returns a Boolean value indicating whether an asynchronous find operation is in progress.
- (BOOL)isFinding

Availability Available in OS X v10.4 and later. See Also
– beginFindString:withOptions: – cancelFindString

(page 133)

(page 135)

Declared in
PDFDocument.h

isLocked
Returns a Boolean value indicating whether the document is locked.
- (BOOL)isLocked

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

141

PDFDocument Class Reference Instance Methods

Return Value YES if the document is locked; NO otherwise. Discussion Only encrypted documents can be locked. Encrypted documents whose password is the empty string are unlocked automatically upon opening, because PDF Kit tries the empty string as a password if none is supplied. Use the unlockWithPassword: (page 149) method to unlock a document using a password. Availability Available in OS X v10.4 and later. Declared in
PDFDocument.h

majorVersion
Returns the major version of the document.
- (int)majorVersion

Return Value The major version of the document. Availability Available in OS X v10.4 and later. See Also
– minorVersion

(page 142)

Declared in
PDFDocument.h

minorVersion
Returns the minor version of the document.
- (int)minorVersion

Return Value The minor version of the document.

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

142

PDFDocument Class Reference Instance Methods

Availability Available in OS X v10.4 and later. See Also
– majorVersion

(page 142)

Declared in
PDFDocument.h

outlineItemForSelection:
Returns the most likely parent PDF outline object for the selection.
- (PDFOutline *)outlineItemForSelection:(PDFSelection *)selection

Parameters
selection

The area of the document currently selected by the user. A selection can span multiple outline items, but only the point representing the first character is considered. Return Value The PDF outline object that is the most likely parent of the specified selection. Note that only the point representing the first character of the selection is considered in this method. Discussion Typically, outlines represent structural items such as chapters. You can use this method to identify the chapter that a selection falls within. Availability Available in OS X v10.4 and later. See Also
– outlineRoot

(page 143)

Declared in
PDFDocument.h

outlineRoot
Returns the root PDF outline object for the document.
- (PDFOutline *)outlineRoot

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

143

PDFDocument Class Reference Instance Methods

Return Value The root outline object or NULL if there is no root outline object. The root outline is the nonvisible top-level container for outline items. Availability Available in OS X v10.4 and later. See Also
– outlineItemForSelection:

(page 143)

– setOutlineRoot:

Declared in
PDFDocument.h

pageAtIndex:
Returns the page at the specified index number.
- (PDFPage *)pageAtIndex:(NSUInteger)index

Discussion Indexes are zero based. This method raises an exception if index is out of bounds. Availability Available in OS X v10.4 and later. See Also (page 145) – indexForPage: (page 138) – insertPage:atIndex: (page 140) – removePageAtIndex: (page 145)
– pageCount – exchangePageAtIndex:withPageAtIndex:

(page 137)

Related Sample Code PDF Annotation Editor

Declared in
PDFDocument.h

pageClass
Returns the class that is allocated and initialized when page objects are created for the document.

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

144

The default implementation of pageClass returns [PDFPage class]. subclass PDFDocument and implement this method to return your custom class.(void)removePageAtIndex:(NSUInteger)index Discussion This method raises an exception if index is out of bounds. 2007-12-11 | © 2004. Note that your custom class must be a subclass of PDFPage. .(Class)pageClass Discussion If you want to supply a custom page class. otherwise.h removePageAtIndex: Removes the page at the specified index point. All Rights Reserved. See Also (page 144) – indexForPage: (page 138) – insertPage:atIndex: (page 140) – removePageAtIndex: (page 145) – pageAtIndex: – exchangePageAtIndex:withPageAtIndex: (page 137) Declared in PDFDocument.h pageCount Returns the number of pages in the document.4 and later. 145 .(NSUInteger)pageCount Availability Available in OS X v10. Declared in PDFDocument.PDFDocument Class Reference Instance Methods . Availability Available in OS X v10. 2007 Apple Inc. the behavior is undefined. .5 and later.

All Rights Reserved.4 and later. 2007-12-11 | © 2004.4 and later. .h selectionForEntireDocument Returns a selection representing the textual content of the entire document. 146 . Availability Available in OS X v10. The starting and ending index values must be in the range of the number of characters (as returned by numberOfCharacters (page 181)) within the respective PDFPage objects.(PDFSelection *)selectionFromPage:(PDFPage *)startPage atCharacterIndex:(NSUInteger)startChar toPage:(PDFPage *)endPage atCharacterIndex:(NSUInteger)endChar Discussion The selection begins at startChar on startPage and ends at endChar on endPage. Declared in PDFDocument. See Also (page 145) – pageAtIndex: (page 144) – indexForPage: (page 138) – insertPage:atIndex: (page 140) – pageCount – exchangePageAtIndex:withPageAtIndex: (page 137) Declared in PDFDocument.4 and later. .h selectionFromPage:atCharacterIndex:toPage:atCharacterIndex: Returns the specified selection based on starting and ending character indexes. 2007 Apple Inc.(PDFSelection *)selectionForEntireDocument Availability Available in OS X v10.PDFDocument Class Reference Instance Methods Availability Available in OS X v10.

(PDFSelection *)selectionFromPage:(PDFPage *)startPage atPoint:(NSPoint)startPt toPage:(PDFPage *)endPage atPoint:(NSPoint)endPt Discussion The selection begins at startPt on startPage and ends at endPt on endPage.4 and later. relative to their respective pages. Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. The starting and ending points should be specified in page space. invoking this method is equivalent to sending the selectionFromPoint:toPoint: message to a PDFPage object. . In this case. . 2007 Apple Inc.h selectionFromPage:atPoint:toPage:atPoint: Returns the specified selection based on starting and ending points.4 and later. 147 . See Also – selectionFromPage:atCharacterIndex:toPage:atCharacterIndex: – selectionForRange: (page 146) (page 183) Declared in PDFDocument.PDFDocument Class Reference Instance Methods See Also – selectionFromPage:atPoint:toPage:atPoint: (page 147) Declared in PDFDocument. Availability Available in OS X v10. The starting and ending points can be on the same page.h setDelegate: Establishes the specified object as the delegate for the PDFDocument object. All Rights Reserved. See Also (page 135) – didMatchString: (page 152) – delegate 2007-12-11 | © 2004.(void)setDelegate:(id)anObject Availability Available in OS X v10.

Pass NULL to strip the outline from a document.4 and later. 2007-12-11 | © 2004. Declared in PDFDocument. . Availability Available in OS X v10. 2007 Apple Inc.5 and later. Availability Available in OS X v10.h setDocumentAttributes: Sets the document attributes.h setOutlineRoot: Sets the document’s root outline to a PDF outline object. All Rights Reserved. Discussion When a PDF document is saved. .PDFDocument Class Reference Instance Methods Related Sample Code PDF Annotation Editor Declared in PDFDocument. 148 . See Also – documentAttributes (page 136). See “Constants” (page 155) for a list of possible key words.(void)setDocumentAttributes:(NSDictionary *)attributes Parameters attributes A dictionary containing document attributes as key-value pairs.(void)setOutlineRoot:(PDFOutline *)outline Parameters outline The outline to be used as the document’s root outline. the outline tree structure is written out to the destination PDF file.

. .h unlockWithPassword: Attempts to unlock an encrypted document. 149 . 2007-12-11 | © 2004. Declared in PDFDocument.PDFDocument Class Reference Instance Methods See Also – outlineRoot Declared in PDFDocument.4 and later.h string Returns a string representing the textual content for the entire document. NO otherwise. equivalent to creating a selection object for the entire document and then invoking the PDFSelection class’s string (page 196) method.(BOOL)unlockWithPassword:(NSString *)password Parameters password The password to unlock an encrypted document (you cannot lock an unlocked PDF document by using an incorrect password). This is a convenience method. Return Value YES if the specified password unlocks the document.(NSString *)string Return Value A string that represents the textual content of the entire document. Discussion Pages are delimited with linefeed characters. Availability Available in OS X v10. 2007 Apple Inc. All Rights Reserved.

4 and later. Once unlocked. See Also (page 135) – writeToURL: (page 151) – writeToURL:withOptions: (page 151) – writeToFile:withOptions: (page 150) – dataRepresentation Declared in PDFDocument. The password string is ignored. Declared in PDFDocument. In either case. one of the following occurs: ● If the document is unlocked with full owner permissions.4 and later. the document maintains its user permissions. unlockWithPassword attempts to obtain full owner permissions with the password string. . 2007 Apple Inc. you cannot use this function to relock the document.PDFDocument Class Reference Instance Methods Discussion If the password is correct. 150 . If you attempt to unlock an already unlocked document.h writeToFile: Writes the document to a file at the specified path. ● Availability Available in OS X v10. this method returns YES. All Rights Reserved. . If the document is unlocked with only user permissions.(BOOL)writeToFile:(NSString *)path Availability Available in OS X v10.(BOOL)writeToFile:(NSString *)path withOptions:(NSDictionary *)options 2007-12-11 | © 2004. and a PDFDocumentDidUnlockNotification notification is sent. If the string fails.h writeToFile:withOptions: Writes the document to a file at the specified path with the specified options. unlockWithPassword does nothing and returns YES. this method returns YES.

kCGPDFContextAllowsCopying and kCGPDFContextAllowsPrinting. . 2007 Apple Inc. see the “Auxiliary Dictionary Keys” in CGPDFContext Reference .(BOOL)writeToURL:(NSURL *)url Availability Available in OS X v10.h writeToURL:withOptions: Writes the document to the specified URL with the specified options.4 and later. kCGPDFContextUserPassword. Availability Available in OS X v10. See Also (page 135) – writeToURL: (page 151) – writeToURL:withOptions: (page 151) – writeToFile: (page 150) – dataRepresentation Declared in PDFDocument.4 and later. All Rights Reserved. 151 . 2007-12-11 | © 2004.h writeToURL: Writes the document to a location specified by the passed-in URL.PDFDocument Class Reference Instance Methods Discussion The most commonly-used options are kCGPDFContextOwnerPassword. part of the Quartz 2D Reference. See Also (page 135) – writeToFile: (page 150) – writeToFile:withOptions: (page 150) – writeToURL:withOptions: (page 151) – dataRepresentation Related Sample Code PDF Annotation Editor PDF Calendar Declared in PDFDocument. For more details about these options.

.(void)documentDidBeginDocumentFind:(NSNotification *)notification Availability Available in OS X v10. See Also (page 135) – writeToURL: (page 151) – writeToFile: (page 150) – writeToFile:withOptions: (page 150) – dataRepresentation Declared in PDFDocument.(BOOL)writeToURL:(NSURL *)url withOptions:(NSDictionary *)options Availability Available in OS X v10.h documentDidBeginDocumentFind: Called when the PDFDocumentDidBeginFindNotification notification is posted. .4 and later. 152 .h Delegate Methods didMatchString: Called for every match found during a find operation.(void)didMatchString:(PDFSelection *)instance Availability Available in OS X v10.PDFDocument Class Reference Delegate Methods .4 and later.4 and later. 2007-12-11 | © 2004. 2007 Apple Inc. See Also – findString:withOptions: – setDelegate: (page 138) (page 147) Declared in PDFDocument. All Rights Reserved.

PDFDocument Class Reference Delegate Methods See Also PDFDocumentDidBeginFindNotification – setDelegate: (page 147) Declared in PDFDocument. .(void)documentDidEndDocumentFind:(NSNotification *)notification Availability Available in OS X v10. 2007 Apple Inc. 2007-12-11 | © 2004. 153 .h documentDidEndDocumentFind: Called when the PDFDocumentDidEndFindNotification notification is posted. . See Also PDFDocumentDidEndFindNotification – setDelegate: (page 147) Declared in PDFDocument. See Also PDFDocumentDidBeginPageFindNotification – setDelegate: (page 147) Declared in PDFDocument.h documentDidBeginPageFind: Called when the PDFDocumentDidBeginPageFindNotification notification is posted.h documentDidEndPageFind: Called when the PDFDocumentDidEndPageFindNotification notification is posted.4 and later.4 and later. All Rights Reserved.(void)documentDidBeginPageFind:(NSNotification *)notification Availability Available in OS X v10.

4 and later. .PDFDocument Class Reference Delegate Methods .(void)documentDidFindMatch:(NSNotification *)notification Availability Available in OS X v10. All Rights Reserved.h documentDidFindMatch: Called when the PDFDocumentDidFindMatchNotification notification is posted. 2007 Apple Inc.(void)documentDidUnlock:(NSNotification *)notification Availability Available in OS X v10. See Also PDFDocumentDidEndPageFindNotification – setDelegate: (page 147) Declared in PDFDocument. See Also PDFDocumentDidFindMatchNotification – setDelegate: (page 147) Declared in PDFDocument. . See Also PDFDocumentDidUnlockNotification – setDelegate: (page 147) Declared in PDFDocument.4 and later.(void)documentDidEndPageFind:(NSNotification *)notification Availability Available in OS X v10.4 and later.h 2007-12-11 | © 2004.h documentDidUnlock: Called when the PDFDocumentDidUnlockNotification notification is posted. 154 .

2007 Apple Inc.h Document Attribute Keys Keys for the document attributes dictionary. *PDFDocumentKeywordsAttribute. Declared in PDFDocument.h. *PDFDocumentSubjectAttribute. All Rights Reserved. 2007-12-11 | © 2004.4 and later. Constants PDFDocumentTitleAttribute An optional text string (an NSString) containing the title of the document. Declared in PDFDocument. Available in OS X v10. 155 .h. *PDFDocumentCreationDateAttribute.PDFDocument Class Reference Constants Constants PDFPrintScalingMode The type of scaling to be used when printing a page (see “PDF Page Scaling Modes for Printing”).4 and later. *PDFDocumentModificationDateAttribute. *PDFDocumentProducerAttribute.5 and later. *PDFDocumentCreatorAttribute. Declared in PDFDocument. extern extern extern extern extern extern extern extern NSString NSString NSString NSString NSString NSString NSString NSString *PDFDocumentTitleAttribute. Available in OS X v10. typedef NSInteger PDFPrintScalingMode. Availability Available in OS X v10. PDFDocumentAuthorAttribute An optional text string (an NSString) containing the name of the author of the document. See documentAttributes (page 136) and setDocumentAttributes: (page 148). *PDFDocumentAuthorAttribute.

PDFDocument Class Reference Constants

PDFDocumentSubjectAttribute

An optional text string (an NSString) containing a description of the subject of the document. Available in OS X v10.4 and later. Declared in PDFDocument.h.
PDFDocumentCreatorAttribute

An optional text string (an NSString) containing the name of the application that created the document content. Available in OS X v10.4 and later. Declared in PDFDocument.h.
PDFDocumentProducerAttribute

An optional text string (an NSString) containing the name of the application that produced the PDF data for the document. Available in OS X v10.4 and later. Declared in PDFDocument.h.
PDFDocumentCreationDateAttribute

An optional text string (an NSDate) containing the document’s creation date. Available in OS X v10.4 and later. Declared in PDFDocument.h.
PDFDocumentModificationDateAttribute

An optional text string (an NSDate) containing the document’s last-modified date. Available in OS X v10.4 and later. Declared in PDFDocument.h.
PDFDocumentKeywordsAttribute

An optional array of text strings (an NSArray of NSString objects) containing keywords for the document. Available in OS X v10.4 and later. Declared in PDFDocument.h. Declared in
PDFDocument.h

PDF Page Scaling Modes for Printing
Modes that specify how the page should be scaled when printing. See the PDFView method printWithInfo:autoRotate:pageScaling: (page 235).

enum { kPDFPrintPageScaleNone = 0,

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

156

PDFDocument Class Reference Notifications

kPDFPrintPageScaleToFit = 1, kPDFPrintPageScaleDownToFit = 2 };

Constants
kPDFPrintPageScaleNone

Do not apply scaling to the page when printing. Available in OS X v10.5 and later. Declared in PDFDocument.h.
kPDFPrintPageScaleToFit

Scale each page up or down to best fit the paper size. Available in OS X v10.5 and later. Declared in PDFDocument.h.
kPDFPrintPageScaleDownToFit

Scale large pages down to fit the paper size (smaller pages do not get scaled up). Available in OS X v10.5 and later. Declared in PDFDocument.h. Declared in
PDFDocument.h

Notifications
PDFDocument declares and posts the following notifications:

PDFDocumentDidUnlockNotification
Posted when a document unlocks after a unlockWithPassword: (page 149) message. The notification object is the PDFDocument object itself. Availability Available in OS X v10.4 and later. Declared in
PDFDocument.h

PDFDocumentDidBeginFindNotification
Posted when the beginFindString:withOptions: (page 133) or findString:withOptions: (page 138) method begins finding.

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

157

PDFDocument Class Reference Notifications

The notification object is the PDFDocument object itself. Availability Available in OS X v10.4 and later. Declared in
PDFDocument.h

PDFDocumentDidEndFindNotification
Posted when the beginFindString:withOptions: (page 133) or findString:withOptions: (page 138) method returns. The beginFindString:withOptions: (page 133) method returns immediately, so this notification is posted when the “find” operation is finished. You can use this notification to know when to close or hide a progress bar. The notification object is the PDFDocument object itself. Availability Available in OS X v10.4 and later. Declared in
PDFDocument.h

PDFDocumentDidBeginPageFindNotification
Posted each time a find operation begins working on a new page of a document. You can use this notification to update a progress bar. The notification object is the PDFDocument object itself. To determine the page, use the @"PDFDocumentPageIndex" key to obtain userinfo of type NSNumber. Availability Available in OS X v10.4 and later. Declared in
PDFDocument.h

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

158

PDFDocument Class Reference Notifications

PDFDocumentDidEndPageFindNotification
Posted each time a find operation finishes working on a page in a document. You can use this notification to update a progress bar. The notification object is the PDFDocument object itself. To determine the page, use the @"PDFDocumentPageIndex" key to obtain userinfo of type NSNumber. Availability Available in OS X v10.4 and later. Declared in
PDFDocument.h

PDFDocumentDidFindMatchNotification
Posted each time a string match is found in a document. The notification object is the PDFDocument object itself. To determine the string selection found, use the @"PDFDocumentFoundSelection" key to obtain userinfo of type PDFSelection * Availability Available in OS X v10.4 and later. Declared in
PDFDocument.h

PDFDocumentDidBeginWriteNotification
Posted each time a write operation begins working on a document. The notification object is the PDFDocument object itself. Availability Available in OS X v10.4 and later. Declared in
PDFDocument.h

PDFDocumentDidEndWriteNotification
Posted each time a write operation finishes working on a document.

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

159

PDFDocument Class Reference Notifications

The notification object is the PDFDocument object itself. Availability Available in OS X v10.4 and later. Declared in
PDFDocument.h

PDFDocumentDidBeginPageWriteNotification
Posted each time a write operation begins working on a page in a document. The notification object is the PDFDocument object itself. To determine the page, use the @"PDFDocumentPageIndex" key to obtain userinfo of type NSNumber. Availability Available in OS X v10.4 and later. Declared in
PDFDocument.h

PDFDocumentDidEndPageWriteNotification
Posted each time a write operation finishes working on a page in a document. The notification object is the PDFDocument object itself. To determine the page, use the @"PDFDocumentPageIndex" key to obtain userinfo of type NSNumber. Availability Available in OS X v10.4 and later. Declared in
PDFDocument.h

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

160

PDFOutline Class Reference Inherits from Conforms to Framework Declared in Availability NSObject NSObject (NSObject) Library/Frameworks/Quartz.) – initWithDocument: 2007-12-11 | © 2004. (Deprecated. This root outline is not visible and serves merely as a container for the visible outlines. If you represent a PDF document outline using outline objects. An outline is an optional component of a PDF document. useful for viewing the structure of the document and for navigating within it. (page 166) Initializes an outline with the specified PDF document. Overview A PDFOutline object is an element in a tree-structured hierarchy that can represent the structure of a PDF document. All Rights Reserved.framework PDFKit/PDFOutline. 2007 Apple Inc. 161 .h Available in OS X v10.4 and later.framework/Frameworks/PDFKit. Tasks Initializing an Outline – init (page 165) Initializes a PDFOutline object. Outlines are created by the document’s author. the root of the hierarchy is obtained from the PDF document itself. Use the PDFDocument outlineRoot (page 143) method instead.

(page 163) Returns the action performed when users click the outline. – numberOfChildren – parent – childAtIndex: – index Managing Outline Labels – label (page 167) Returns the label for the outline. – action – setAction: – setDestination: 2007-12-11 | © 2004. 162 . (page 168) Returns the number of child outline objects in the outline. (page 169) Sets the action associated with the outline. 2007 Apple Inc. (page 169) Sets the destination associated with the outline. All Rights Reserved. (page 170) Sets the label for the outline (has no effect on the root outline object). – setLabel: Managing Actions and Destinations – destination (page 164) Returns the destination associated with the outline.PDFOutline Class Reference Tasks Getting Information About an Outline – document (page 165) Returns the document with which the outline is associated. (page 164) Returns the child outline object at the specified index. (page 168) Returns the parent outline object of the outline (returns NULL if called on the root outline object). (page 165) Returns the index of the outline.

See Also – setAction: (page 169) Declared in PDFOutline. All Rights Reserved. . 163 . it does not have an action. – removeFromParent Managing the Disclosure of an Outline Object – isOpen (page 167) Returns a Boolean value that indicates whether the outline object is initially disclosed.(PDFAction *)action Discussion The root outline serves only as a container for the outlines it owns. 2007 Apple Inc.5 and later. instead of an action. (page 168) Removes the outline object from its parent (does nothing if outline object is the root outline object). Note that a PDFOutline object can have either an action or a destination. action returns the appropriate PDF Kit action type object. action returns a PDFActionGoTo object (this is equivalent to calling destination (page 164) on the PDFOutline object). such as PDFActionURL. Availability Available in OS X v10. – setIsOpen: Instance Methods action Returns the action performed when users click the outline. not both. For other action types. (page 169) Sets the initial disclosure state of the outline object.PDFOutline Class Reference Instance Methods Changing an Outline Hierarchy – insertChild:atIndex: (page 166) Inserts the specified outline object at the specified index.h 2007-12-11 | © 2004. If the PDFOutline object has a destination.

PDFOutline Class Reference Instance Methods childAtIndex: Returns the child outline object at the specified index. this method returns the destination from the PDFActionGoTo object. Availability Available in OS X v10. 164 . Availability Available in OS X v10.h destination Returns the destination associated with the outline. . However.5 and later. Important: In OS X v10. Note that if the associated action is a PDFActionGoTo. one-off child outline object. a PDFOutline object retains all its children.(PDFOutline *)childAtIndex:(NSUInteger)index Discussion The index is zero-based. when meant that you had to include code to retain the child. . In Tiger. so childAtIndex: returns the same retained child outline object every time it’s called. This method may return NULL if the outline has an associated action instead of a destination. See Also – index (page 165) Declared in PDFOutline. All Rights Reserved.4. This differs from the behavior of PDFOutline in OS X v10.4 and later. it is better to use the action (page 163) method for this purpose. it does not have a destination.4 and later. not both. This means that you do not need to retain the object returned by childAtIndex:. childAtIndex: returns an auto-released. This method throws an exception if index is out of range. See Also – setDestination: (page 169) 2007-12-11 | © 2004. 2007 Apple Inc. Note that a PDFOutline object can have either a destination or an action.(PDFDestination *)destination Discussion The root outline serves only as a container for the outlines it owns.

you must add the root outline object to your PDF document by passing it to the PDFDocument setOutlineRoot: (page 148) method. has an index value of 0. . 2007-12-11 | © 2004. and any outline object without a parent.5 and later. The root outline object. . 165 .(id)init Discussion If you want the PDFOutline object returned by this method to be the outline root. 2007 Apple Inc.h index Returns the index of the outline. . you must add additional PDFOutline objects to create the outline hierarchy you desire. Declared in PDFOutline.h document Returns the document with which the outline is associated.PDFOutline Class Reference Instance Methods Declared in PDFOutline.h init Initializes a PDFOutline object. Availability Available in OS X v10.(NSUInteger)index Discussion The index of the outline object is relative to its siblings and from the perspective of the parent of the outline object. Then. All Rights Reserved. Declared in PDFOutline.(PDFDocument *)document Availability Available in OS X v10.4 and later.

4 and later. Use the PDFDocument outlineRoot (page 143) method instead. using insertChild:atIndex: (page 166) Availability Available in OS X v10. respectively. 2007 Apple Inc. Invoking this method is equivalent to sending the outlineRoot message to a PDFDocument object. you must add this outline object to the existing PDFOutline object as a new child.4 and later.(id)initWithDocument:(PDFDocument *)document Discussion Returns NULL if the document does not contain an outline. Before you call this method on a PDFOutline object that already has a parent. In addition. All Rights Reserved. Availability Available in OS X v10. you should retain the object and call removeFromParent (page 168) on it first. Declared in PDFOutline.) . Declared in PDFOutline. 166 .h initWithDocument: Initializes an outline with the specified PDF document.(void)insertChild:(PDFOutline *)child atIndex:(NSUInteger)index Discussion To build a PDF outline hierarchy.PDFOutline Class Reference Instance Methods If you want the PDFOutline object returned by this method to be a child of an existing outline. use this method to add child outline objects.5 and later. you must use setLabel: (page 170) to give it a label and give it either a destination or action using setDestination: (page 169) or setAction: (page 169). 2007-12-11 | © 2004.h insertChild:atIndex: Inserts the specified outline object at the specified index. . Availability Available in OS X v10. (Deprecated.

Availability Available in OS X v10.(BOOL)isOpen Discussion Calling isOpen on an outline object that has no children always returns NO. 2007 Apple Inc. Availability Available in OS X v10.h isOpen Returns a Boolean value that indicates whether the outline object is initially disclosed. See Also – setIsOpen: (page 169) Declared in PDFOutline. See Also – setLabel: (page 170) Declared in PDFOutline. .4 and later.h label Returns the label for the outline.h 2007-12-11 | © 2004.5 and later.(NSString *)label Discussion The root outline serves only as a container for the outlines it owns.PDFOutline Class Reference Instance Methods See Also – childAtIndex: (page 164) Declared in PDFOutline. Calling isOpen on the root outline object always returns YES. 167 . All Rights Reserved. . it does not have a label.

5 and later.5 and later Declared in PDFOutline.(NSUInteger)numberOfChildren Availability Available in OS X v10. .h 2007-12-11 | © 2004. All Rights Reserved. . See Also – childAtIndex: (page 164) Declared in PDFOutline.(void)removeFromParent Availability Available in OS X v10.4 and later. . 168 .PDFOutline Class Reference Instance Methods numberOfChildren Returns the number of child outline objects in the outline. 2007 Apple Inc.h removeFromParent Removes the outline object from its parent (does nothing if outline object is the root outline object). See Also – parent (page 168) Declared in PDFOutline.(PDFOutline *)parent Availability Available in OS X v10.h parent Returns the parent outline object of the outline (returns NULL if called on the root outline object).

PDFOutline Class Reference Instance Methods setAction: Sets the action associated with the outline. Availability Available in OS X v10.h setIsOpen: Sets the initial disclosure state of the outline object. because the root outline does not have an action or a destination. All Rights Reserved.(void)setIsOpen:(BOOL)open 2007-12-11 | © 2004.(void)setAction:(PDFAction *)action Discussion Calling setAction on the root outline object has no effect. See Also – destination (page 164) Declared in PDFOutline. .5 and later. See Also – action (page 163) Declared in PDFOutline. because the root outline does not have an action or a destination.h setDestination: Sets the destination associated with the outline.(void)setDestination:(PDFDestination *)destination Discussion Calling setDestination on the root outline object has no effect. 169 . . 2007 Apple Inc.. Availability Available in OS X v10. .5 and later.

All Rights Reserved.5 and later. . Availability Available in OS X v10.h 2007-12-11 | © 2004.h setLabel: Sets the label for the outline (has no effect on the root outline object). See Also – label (page 167) Declared in PDFOutline. 170 .PDFOutline Class Reference Instance Methods Discussion Calling setIsOpen on an outline object with no children or on the root outline object has no effect.(void)setLabel:(NSString *)label Availability Available in OS X v10. See Also – isOpen (page 167) Declared in PDFOutline.5 and later. 2007 Apple Inc.

and get the textual content of a page as an NSString object. All Rights Reserved. add annotations. text. define selections.4 and later.h Available in OS X v10. a subclass of NSObject. you don’t need to use PDFPage.framework/Frameworks/PDFKit. 2007-12-11 | © 2004. 2007 Apple Inc.framework PDFKit/PDFPage. Your application instantiates a PDFPage object by asking for one from a PDFDocument object. count characters. For simple display and navigation of PDF documents within your application.PDFPage Class Reference Inherits from Conforms to NSObject NSCopying NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. With them you can render PDF content onscreen or to a printer. and selections. PDFPage objects are flexible and powerful. Link Snoop PDF Annotation Editor PDF Calendar Overview PDFPage. defines methods used to render PDF pages and work with annotations. You need only use PDFView. 171 .

(page 176) Returns the bounds for the specified PDF display box. – displaysAnnotations – setDisplaysAnnotations: – addAnnotation: 2007-12-11 | © 2004.) (page 180) Creates a new PDFPage object and initializes it with the specified NSImage object. (page 185) Specifies whether or not to display annotations for the page. Use [PDFPage init] or initWithImage: instead. (Deprecated. (page 178) Returns a Boolean value indicating whether annotations are displayed for the page. 172 . 2007 Apple Inc. All Rights Reserved. (page 180) Returns the label for the page. (page 185) Sets the bounds for the specified box. – label – boundsForBox: – setBounds:forBox: – rotation – setRotation: Working with Annotations – annotations (page 175) Returns an array containing the page’s annotations.PDFPage Class Reference Tasks Tasks Initializing a Page – initWithDocument: (page 179) Initializer for subclasses of PDFPage. (page 181) Returns the page rotation angle in degrees. – initWithImage: Getting Information About a Page – document (page 179) Returns the PDFDocument object with which the page is associated. (page 186) Sets the rotation angle for the page in degrees. (page 174) Adds the specified annotation object to the page.

– transformContextForBox: Working with Textual Content – numberOfCharacters (page 181) Returns the number of characters on the page. (page 177) Returns the character index value for the specified point in page space. if there is one. (page 174) Returns the annotation. (page 187) Transforms the current context. 173 . (page 182) Returns the whole line of text that includes the specified point. – characterIndexAtPoint: Working with Selections – selectionForRect: (page 183) Returns the text enclosed within the specified rectangle. of the character at the specified index. 2007 Apple Inc. at the specified point. given the specified box.PDFPage Class Reference Tasks – removeAnnotation: (page 181) Removes the specified annotation from the page. including whitespace characters. All Rights Reserved. in page space. expressed in page (user) coordinates. (page 184) Returns the whole word that includes the specified point. (page 176) Returns an NSAttributedString object representing the text on the page. – string – attributedString – characterBoundsAtIndex: (page 177) Returns the bounds. – selectionForWordAtPoint: – selectionForLineAtPoint: 2007-12-11 | © 2004. (page 186) Returns an NSString object representing the text on the page. – annotationAtPoint: Rendering Pages – drawWithBox: (page 179) Draws the page within the specified box.

– selectionForRange: Miscellaneous – dataRepresentation (page 178) Returns the PDF data (that is. at the specified point. if there is one. (page 183) Returns the text contained within the specified range. 174 . Instance Methods addAnnotation: Adds the specified annotation object to the page.(void)addAnnotation:(PDFAnnotation *)annotation Availability Available in OS X v10.h annotationAtPoint: Returns the annotation. All Rights Reserved.(PDFAnnotation *)annotationAtPoint:(NSPoint)point 2007-12-11 | © 2004. .4 and later.PDFPage Class Reference Instance Methods – selectionFromPoint:toPoint: (page 184) Returns the text between the two specified points in page space. a PDF document) representing this page. See Also – annotations – – – – (page 175) displaysAnnotations (page 178) setDisplaysAnnotations: (page 185) removeAnnotation: (page 181) annotationAtPoint: (page 174) Declared in PDFPage. This method does not preserve external page links. 2007 Apple Inc. .

h annotations Returns an array containing the page’s annotations. Returns NULL if there is no annotation at point. the frontmost (or topmost) one is returned (the annotations are searched in reverse order of their appearance in the PDF data file).4 and later.PDFPage Class Reference Instance Methods Discussion Use this method for hit-testing based on the current cursor position. See Also – annotations – – – – (page 175) displaysAnnotations (page 178) setDisplaysAnnotations: (page 185) addAnnotation: (page 174) removeAnnotation: (page 181) Declared in PDFPage.4 and later. Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. Specify the point in page space. All Rights Reserved. If more than one annotation shares the specified point. Availability Available in OS X v10. Availability Available in OS X v10. See Also – displaysAnnotations – – – – (page 178) setDisplaysAnnotations: (page 185) addAnnotation: (page 174) removeAnnotation: (page 181) annotationAtPoint: (page 174) Related Sample Code Link Snoop PDF Annotation Editor 2007-12-11 | © 2004. 175 .(NSArray *)annotations Discussion The elements of the array will most likely be typed to subclasses of the PDFAnnotation class. . 2007 Apple Inc.

the bounds for the media box are returned instead.h boundsForBox: Returns the bounds for the specified PDF display box. 2007 Apple Inc. If you request the bounds for the crop box. . The coordinates for the box are in page space. and the PDF does not includes these types.(NSAttributedString *)attributedString Availability Available in OS X v10.4 and later.h attributedString Returns an NSAttributedString object representing the text on the page. All Rights Reserved.(NSRect)boundsForBox:(PDFDisplayBox)box Discussion The PDFDisplayBox enumeration defines the various box types (see “Constants” (page 187) for additional information about box types). the bounds for the crop box are returned instead.4 and later. Note that only the media box is required for a PDF. note that the bounds boundsForBox returns are intersected with the page’s media box. 176 . Also. See Also – numberOfCharacters – string (page 181) (page 186) Declared in PDFPage. If you request the bounds for other box types. so you might need to transform the points if the page has a rotation on it. 2007-12-11 | © 2004.PDFPage Class Reference Instance Methods Declared in PDFPage. boundsForBox throws a range exception if box is not in range. Availability Available in OS X v10. but the PDF does not include a crop box. .

Availability Available in OS X v10. . of the character at the specified index. All Rights Reserved.h characterIndexAtPoint: Returns the character index value for the specified point in page space. 2007-12-11 | © 2004. in page space. 2007 Apple Inc.h characterBoundsAtIndex: Returns the bounds. See Also – characterIndexAtPoint: (page 177) Declared in PDFPage.(NSRect)characterBoundsAtIndex:(NSInteger)index Discussion In the unlikely event that there is more than one character at the specified index point. Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.PDFPage Class Reference Instance Methods See Also – setBounds:forBox: Related Sample Code Link Snoop PDF Annotation Editor Declared in PDFPage. 177 . the method returns -1. Note that the bounds returned are not guaranteed to have integer coordinates. Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.4 and later.(NSInteger)characterIndexAtPoint:(NSPoint)point Discussion If there is no character at the specified point. . only the bounds of the first character is returned.

178 . This method does not preserve external page links.4 and later.h displaysAnnotations Returns a Boolean value indicating whether annotations are displayed for the page. Declared in PDFPage. .(BOOL)displaysAnnotations Discussion If YES. See Also – characterBoundsAtIndex: (page 177) Declared in PDFPage. the page will draw annotations when a drawing method is called.(NSData *)dataRepresentation Availability Available in OS X v10. Availability Available in OS X v10.4 and later. .h dataRepresentation Returns the PDF data (that is. All Rights Reserved. 2007 Apple Inc. See Also – annotations (page 175) (page 185) – setDisplaysAnnotations: – addAnnotation: (page 174) – removeAnnotation: (page 181) – annotationAtPoint: (page 174) – drawWithBox: (page 179) 2007-12-11 | © 2004.4 and later. a PDF document) representing this page.PDFPage Class Reference Instance Methods Availability Available in OS X v10.

2007 Apple Inc. If the page is set to display annotations.4 and later.h document Returns the PDFDocument object with which the page is associated. Related Sample Code PDF Annotation Editor Declared in PDFPage.h initWithDocument: Initializer for subclasses of PDFPage.PDFPage Class Reference Instance Methods Declared in PDFPage. (Deprecated. All Rights Reserved. To clear the background before drawing. this method also draws them. 179 . . Use [PDFPage init] or initWithImage: instead.(PDFDocument *)document Availability Available in OS X v10. . This method does not clear the background.h drawWithBox: Draws the page within the specified box. Availability Available in OS X v10. See Also – displaysAnnotations (page 178) Declared in PDFPage.) . use NSRectFill with NSColor set (typically) to white.(id)initWithDocument:(PDFDocument *)document 2007-12-11 | © 2004.(void)drawWithBox:(PDFDisplayBox)box Discussion This method takes into account the page rotation and draws clipped to the specified box.4 and later.

See Also – document (page 179) Declared in PDFPage.h label Returns the label for the page. . Declared in PDFPage.h initWithImage: Creates a new PDFPage object and initializes it with the specified NSImage object.4 and later. “4-1” and so on). and so on. but nonnumerical labels are also possible (such as “xxi” .(NSString *)label Discussion Typically.4 and later. the label is “1” for the first page. All Rights Reserved. 2007 Apple Inc. Availability Available in OS X v10.(id)initWithImage:(NSImage *)image Availability Available in OS X v10. . Availability Available in OS X v10. “2” for the second page. including boundsForBox and drawInRect:withBox:. Declared in PDFPage.5 and later. 180 .h 2007-12-11 | © 2004.PDFPage Class Reference Instance Methods Discussion Subclasses of PDFPage must handle several methods that are transparently handled when using the PDFPage class directly.

(void)removeAnnotation:(PDFAnnotation *)annotation Availability Available in OS X v10. . . including whitespace characters. See Also – annotations – – – – (page 175) displaysAnnotations (page 178) setDisplaysAnnotations: (page 185) addAnnotation: (page 174) annotationAtPoint: (page 174) Related Sample Code PDF Annotation Editor Declared in PDFPage. All Rights Reserved. 181 .PDFPage Class Reference Instance Methods numberOfCharacters Returns the number of characters on the page.(NSUInteger)numberOfCharacters Availability Available in OS X v10.h rotation Returns the page rotation angle in degrees.4 and later.4 and later. See Also – string (page 186) Declared in PDFPage.(int)rotation 2007-12-11 | © 2004. 2007 Apple Inc. .h removeAnnotation: Removes the specified annotation from the page.

4 and later. it is up to the author of a page whether zero rotation corresponds to upright text when displayed on a monitor.(PDFSelection *)selectionForLineAtPoint:(NSPoint)point Discussion Returns NULL if no line of text contains point. or 270. Availability Available in OS X v10. 182 . See Also (page 183) – selectionForWordAtPoint: (page 184) – selectionFromPoint:toPoint: (page 184) – selectionForRange: (page 183) – selectionForRect: Declared in PDFPage. If you are subclassing PDFView and displaying pages yourself. The rotation of pages with negative rotation is converted to a corresponding positive rotation. See Also – setRotation: (page 186) Related Sample Code PDF Annotation Editor Declared in PDFPage. 180. . don’t assume a rotation of 0. Availability Available in OS X v10.h 2007-12-11 | © 2004. 90. All Rights Reserved.PDFPage Class Reference Instance Methods Discussion The rotation is a positive multiple of 90: 0. Pages with an inherent rotation display rotated when opened unless you set their rotation to zero. Regardless of the inherent rotation angle.4 and later.h selectionForLineAtPoint: Returns the whole line of text that includes the specified point. 2007 Apple Inc. Use this method to respond to a triple-click.

See Also (page 183) – selectionForWordAtPoint: (page 184) – selectionForLineAtPoint: (page 182) – selectionFromPoint:toPoint: (page 184) – selectionForRect: Declared in PDFPage. .(PDFSelection *)selectionForRange:(NSRange)range Discussion This method raises an exception if the range length is 0 or if either end of the range is outside the range of characters on the page. 183 .h selectionForRect: Returns the text enclosed within the specified rectangle.PDFPage Class Reference Instance Methods selectionForRange: Returns the text contained within the specified range. 2007 Apple Inc. Availability Available in OS X v10. expressed in page (user) coordinates. All Rights Reserved. .(PDFSelection *)selectionForRect:(NSRect)rect Availability Available in OS X v10.4 and later. See Also (page 184) – selectionForLineAtPoint: (page 182) – selectionFromPoint:toPoint: (page 184) – selectionForRange: (page 183) – selectionForWordAtPoint: Related Sample Code Link Snoop Declared in PDFPage.4 and later.h 2007-12-11 | © 2004.

In determining the selection. . Availability Available in OS X v10.4 and later. the points are sorted first top to bottom and then left to right. picture the rectangle defined by startPoint and endPoint.(PDFSelection *)selectionFromPoint:(NSPoint)startPoint toPoint:(NSPoint)endPoint Discussion Either point may be the one closer to the start of the page.(PDFSelection *)selectionForWordAtPoint:(NSPoint)point Discussion Returns NULL if no word contains point. The selection ends at the last character fully within the defined rectangle and closest to its lower-right corner. 2007 Apple Inc. Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. See Also (page 183) – selectionForLineAtPoint: (page 182) – selectionFromPoint:toPoint: (page 184) – selectionForRange: (page 183) – selectionForRect: Declared in PDFPage. The selection begins at the first character fully within the defined rectangle and closest to its upper-left corner. .4 and later.PDFPage Class Reference Instance Methods selectionForWordAtPoint: Returns the whole word that includes the specified point. Availability Available in OS X v10. Use this method to respond to a double-click. All Rights Reserved. See Also – selectionForRect: (page 183) 2007-12-11 | © 2004. To visualize the selection.h selectionFromPoint:toPoint: Returns the text between the two specified points in page space. 184 .

this method creates it for you. All Rights Reserved.h setDisplaysAnnotations: Specifies whether or not to display annotations for the page.(void)setDisplaysAnnotations:(BOOL)display Discussion If display is YES. To remove a box. See Also (page 175) – displaysAnnotations (page 178) – annotations 2007-12-11 | © 2004. Availability Available in OS X v10.4 and later. 185 .PDFPage Class Reference Instance Methods (page 184) (page 182) – selectionForRange: (page 183) – selectionForWordAtPoint: – selectionForLineAtPoint: Declared in PDFPage.(void)setBounds:(NSRect)bounds forBox:(PDFDisplayBox)box Discussion If the box does not exist. 2007 Apple Inc. See Also – boundsForBox: (page 176) Declared in PDFPage.h setBounds:forBox: Sets the bounds for the specified box.4 and later. the page will draw annotations when a drawing method is called. . Availability Available in OS X v10. pass NSZeroRect for the bounds (note that you cannot remove the media box). If the box bounds are not in range. . this method throws a range exception.

2007 Apple Inc.4 and later. . -90 is changed to 270). .(void)setRotation:(int)angle Discussion The rotation must be a positive or negative multiple of 90 (negative angles are converted to their positive equivalents.PDFPage Class Reference Instance Methods (page 174) – removeAnnotation: (page 181) – annotationAtPoint: (page 174) – addAnnotation: Declared in PDFPage.h setRotation: Sets the rotation angle for the page in degrees. All Rights Reserved. for example. 186 . See Also – rotation (page 181) Declared in PDFPage. Availability Available in OS X v10.4 and later.(NSString *)string Availability Available in OS X v10. otherwise this method throws an exception.h 2007-12-11 | © 2004. See Also (page 181) – attributedString (page 176) – numberOfCharacters Declared in PDFPage.h string Returns an NSString object representing the text on the page.

given the specified box. Availability Available in OS X v10.(void)transformContextForBox:(PDFDisplayBox)box Discussion When transforming the current context.5 and later.h.4 and later. See Also – drawWithBox: Declared in PDFPage. Declared in PDFPage. This is a convenient method to call within the PDFView drawPage: (page 228) method or from within a draw method of a PDFAnnotation subclass. All Rights Reserved. Constant Description kPDFDisplayBoxMediaBox A rectangle defining the boundaries of the physical medium for display or printing.4 and later. kPDFDisplayBoxCropBox A rectangle defining the boundaries of the visible region . . 2007 Apple Inc. 187 .PDFPage Class Reference Constants transformContextForBox: Transforms the current context. Default value equal to kPDFDisplayBoxMediaBox. expressed in default user-space units. Declared in PDFPage.h Constants The following box types may be used with PDFPage drawing and bounds-setting methods. expressed in default user-space units. units.h. Available in OS X v10. 2007-12-11 | © 2004. as well as the origin of the box with respect to the page’s base coordinate system. Available in OS X v10. See the Adobe PDF Specification for more information on box types. this method takes into account the rotation of the page. and coordinate systems.

Available in OS X v10. kPDFDisplayBoxTrimBox A rectangle defining the intended boundaries of the finished page.4 and later. 2007 Apple Inc. Default value equal to kPDFDisplayBoxCropBox. All Rights Reserved. 2007-12-11 | © 2004.4 and later. Available in OS X v10. Declared in PDFPage. 188 .PDFPage Class Reference Constants Constant Description kPDFDisplayBoxBleedBox A rectangle defining the boundaries of the clip region for the page contents in a production environment. Available in OS X v10. Default value equal to kPDFDisplayBoxCropBox. Default value equal to kPDFDisplayBoxCropBox.h. kPDFDisplayBoxArtBox A rectangle defining the boundaries of the page’s meaningful content including surrounding white space intended for display.4 and later.h. Declared in PDFPage.h. Declared in PDFPage.

2007 Apple Inc. Link Snoop PDF Annotation Editor Overview A PDFSelection object identifies a contiguous or noncontiguous selection of text in a PDF document. 2007-12-11 | © 2004.PDFSelection Class Reference Inherits from Conforms to NSObject NSCopying NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. All Rights Reserved. Getting Information About a Selection – pages (page 195) Returns the array of pages contained in the selection.h Available in OS X v10. 189 .4 and later.framework/Frameworks/PDFKit. Tasks Initializing a Selection – initWithDocument: (page 195) Returns an empty PDFSelection object.framework PDFKit/PDFSelection.

– setColor: 2007-12-11 | © 2004. 190 . 2007 Apple Inc.PDFSelection Class Reference Tasks – string (page 196) Returns an NSString object representing the text contained in the selection (may contain linefeed characters). (page 196) Returns an array of selections. (page 194) Extends the selection from its end toward the end of the document. one for each line of text covered by the receiver. (page 196) Sets the color used for the drawing of a selection in both active and inactive states. – attributedString – boundsForPage: (page 192) Returns the bounds of the selection on the specified page. (page 192) Returns an NSAttributedString object representing the text contained in the selection (may contain linefeed characters). – drawForPage:withBox:active: (page 193) Draws the selection relative to the origin of the specified box in page space. – addSelections: – extendSelectionAtEnd: – extendSelectionAtStart: Managing Selection Drawing – drawForPage:active: (page 193) Calls drawForPage:withBox:active: (page 193) with a default value for box parameter. All Rights Reserved. (page 191) Adds the specified array of selections to the receiving selection. (page 192) Returns the color used to draw the selection. – selectionsByLine – color Modifying a Selection – addSelection: (page 191) Adds the specified selection to the receiving selection. (page 194) Extends the selection from its start toward the beginning of the document.

4 and later.5 and later. 2007 Apple Inc. See Also (page 194) – extendSelectionAtStart: (page 194) – extendSelectionAtEnd: Declared in PDFSelection. See Also – addSelection: Declared in PDFSelection. 191 .h 2007-12-11 | © 2004.h addSelections: Adds the specified array of selections to the receiving selection. Availability Available in OS X v10.PDFSelection Class Reference Instance Methods Instance Methods addSelection: Adds the specified selection to the receiving selection.(void)addSelection:(PDFSelection *)selection Discussion Selections do not have to be contiguous. . All Rights Reserved.(void)addSelections:(NSArray *)selections Discussion This method provides better performance than multiple calls to addSelection if you need to add several selections to an existing selection. If the selection to be added overlaps with the receiving selection. . Availability Available in OS X v10. the overlap is removed in a process called normalization. This is because the normalization of the selection (the removal of any overlaps between selections) occurs only once. after all selections have been added.

192 . .(NSColor *)color 2007-12-11 | © 2004. . Related Sample Code PDF Annotation Editor Declared in PDFSelection. All Rights Reserved.PDFSelection Class Reference Instance Methods attributedString Returns an NSAttributedString object representing the text contained in the selection (may contain linefeed characters).(NSAttributedString *)attributedString Availability Available in OS X v10. Availability Available in OS X v10. 2007 Apple Inc. See Also – string (page 196) Declared in PDFSelection. .(NSRect)boundsForPage:(PDFPage *)page Discussion The selection rectangle is given in page space.h color Returns the color used to draw the selection.h boundsForPage: Returns the bounds of the selection on the specified page.4 and later.4 and later. Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.

4 and later.(void)drawForPage:(PDFPage *)page withBox:(PDFDisplayBox)box active:(BOOL)active Discussion The selection is drawn using the current highlight color.h drawForPage:withBox:active: Draws the selection relative to the origin of the specified box in page space. . If NO.5 and later. it uses secondarySelectedControlColor. If NO. See Also – setColor: Declared in PDFSelection. Availability Available in OS X v10.PDFSelection Class Reference Instance Methods Discussion Note that when no color has been specified for the PDFSelection objects in a document. 193 . See Also – drawForPage:withBox:active: (page 193) Declared in PDFSelection.h drawForPage:active: Calls drawForPage:withBox:active: (page 193) with a default value for box parameter. drawing uses selectedTextBackgroundColor. . If active is YES. it uses secondarySelectedControlColor. the selections are drawn using [NSColor selectedTextBackgroundColor] for the active state and [NSColor secondarySelectedControlColor] for the inactive state. If active is YES. Availability Available in OS X v10.(void)drawForPage:(PDFPage *)page active:(BOOL)active Discussion The default value is kPDFDisplayBoxCropBox. All Rights Reserved. 2007 Apple Inc. 2007-12-11 | © 2004. drawing uses selectedTextBackgroundColor. Refer to the PDFPage class for the list of available box types.

up to and including the end of the document.(void)extendSelectionAtEnd:(NSInteger)chars Discussion The selection may be extended by any amount.4 and later. 2007 Apple Inc. 194 .PDFSelection Class Reference Instance Methods Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. up to and including the beginning of the document. 2007-12-11 | © 2004. .4 and later. See Also – drawForPage:active: (page 193) Declared in PDFSelection.4 and later.h extendSelectionAtStart: Extends the selection from its start toward the beginning of the document.h extendSelectionAtEnd: Extends the selection from its end toward the end of the document. . All Rights Reserved. Availability Available in OS X v10. Availability Available in OS X v10. Availability Available in OS X v10. See Also – extendSelectionAtStart: – addSelection: (page 194) (page 191) Declared in PDFSelection.(void)extendSelectionAtStart:(NSInteger)chars Discussion The selection may be extended by any amount.

2007 Apple Inc. . you don’t need to create a PDFSelection object. using addSelection: and addSelections.h initWithDocument: Returns an empty PDFSelection object.PDFSelection Class Reference Instance Methods See Also (page 194) – addSelection: (page 191) – extendSelectionAtEnd: Declared in PDFSelection.h pages Returns the array of pages contained in the selection. Availability Available in OS X v10. 195 .4 and later.5 and later. Declared in PDFSelection. but you can use an empty PDFSelection object as a container into which you can place selections.(NSArray *)pages Discussion Pages are sorted by index number. Availability Available in OS X v10.(id)initWithDocument:(PDFDocument *)document Discussion Typically. Related Sample Code PDF Annotation Editor Declared in PDFSelection.h 2007-12-11 | © 2004. All Rights Reserved. .

. one for each line of text covered by the receiver. 2007 Apple Inc. See Also – color Declared in PDFSelection. Availability Available in OS X v10.PDFSelection Class Reference Instance Methods selectionsByLine Returns an array of selections. Use the setColor method to supply a color you want to be used for the drawing of both active and inactive selections. Availability Available in OS X v10. .5 and later.h setColor: Sets the color used for the drawing of a selection in both active and inactive states.5 and later. selectionsByLine returns an array that contains one PDFSelection object for each line of text in the paragraph.h string Returns an NSString object representing the text contained in the selection (may contain linefeed characters). . for example. All Rights Reserved. Declared in PDFSelection. the selections are drawn using [NSColor selectedTextBackgroundColor] for the active state and [NSColor secondarySelectedControlColor] for the inactive state.(NSArray *)selectionsByLine Discussion If you call this method on a PDFSelection object that represents a paragraph. 196 .(void)setColor:(NSColor *)color Discussion When no color has been specified for the PDFSelection objects in a document.(NSString *)string 2007-12-11 | © 2004.

h 2007-12-11 | © 2004. 197 . All Rights Reserved.4 and later. 2007 Apple Inc. See Also – attributedString Related Sample Code Link Snoop Declared in PDFSelection.PDFSelection Class Reference Instance Methods Availability Available in OS X v10.

5 and later.framework/Frameworks/PDFKit.framework PDFKit/PDFThumbnailView. Overview A PDFThumbnailView object contains a set of thumbnails. 198 . each of which represents a page in a PDF document. (page 206) Associates the specified PDFView object with the thumbnail view.h Available in OS X v10. – setPDFView: 2007-12-11 | © 2004. 2007 Apple Inc.PDFThumbnailView Class Reference Inherits from Conforms to NSView : NSResponder : NSObject NSCoding NSAnimatablePropertyContainer (NSView) NSUserInterfaceItemIdentification (NSView) NSDraggingDestination (NSView) NSCoding (NSResponder) NSObject (NSObject) Framework Declared in Availability Library/Frameworks/Quartz. All Rights Reserved. Tasks Accessing the Associated PDF View – PDFView (page 202) Returns the PDFView object associated with the thumbnail view.

(page 205) Sets the font used to label the thumbnails. (page 200) Returns a Boolean value indicating whether users can select multiple thumbnails in the thumbnail view at one time. (page 203) Sets whether users can drag thumbnails within the thumbnail view. re-order pages in the document) within the thumbnail view. re-order pages in the document. (page 204) Sets the color used in the background of the thumbnail view. (page 204) Sets whether the thumbnail view allows users to select more than one thumbnail at a time. that is. 2007 Apple Inc. 199 . – setThumbnailSize: Working with Thumbnail View Display Characteristics – maximumNumberOfColumns (page 202) Returns the maximum number of columns of thumbnails the thumbnail view can display. (page 205) Sets the maximum number of columns of thumbnails the thumbnail view can display. (page 201) Returns the color used in the background of the thumbnail view.PDFThumbnailView Class Reference Tasks Managing the Size of a Thumbnail View – thumbnailSize (page 207) Returns the maximum width and height of the thumbnails in the thumbnail view. – setMaximumNumberOfColumns: – labelFont – setLabelFont: – backgroundColor – setBackgroundColor: Managing the Behavior of a Thumbnail View – allowsDragging (page 200) Returns a Boolean value indicating whether users can drag thumbnails (that is. (page 201) Returns the font used to label the thumbnails. (page 206) Sets the maximum width and height of the thumbnails in the thumbnail view. – setAllowsDragging: – allowsMultipleSelection – setAllowsMultipleSelection: 2007-12-11 | © 2004. All Rights Reserved.

PDFThumbnailView Class Reference Instance Methods – selectedPages (page 203) Returns an array of PDF pages that correspond to the selected thumbnails in the thumbnail view.(BOOL)allowsDragging Return Value YES if users can re-order pages by dragging thumbnails.(BOOL)allowsMultipleSelection Return Value YES if users can select multiple thumbnails simultaneously. .5 and later. you can get the PDF page that corresponds to the selected thumbnail using the PDFView method currentPage (page 224). 2007-12-11 | © 2004.h allowsMultipleSelection Returns a Boolean value indicating whether users can select multiple thumbnails in the thumbnail view at one time. 2007 Apple Inc. NO otherwise. . Instance Methods allowsDragging Returns a Boolean value indicating whether users can drag thumbnails (that is. 200 . See Also – setAllowsDragging: (page 203) Declared in PDFThumbnailView. All Rights Reserved. Availability Available in OS X v10. When this is the case. Discussion By default. NO otherwise. PDFThumbnailView allows only a single thumbnail to be selected at one time. re-order pages in the document) within the thumbnail view.

. 201 .h labelFont Returns the font used to label the thumbnails.(NSFont *)labelFont Return Value The font used in the thumbnail labels.(NSColor *)backgroundColor Return Value The color of the background in the thumbnail view.5 and later. See Also – setAllowsMultipleSelection: – selectedPages (page 204) (page 203) Declared in PDFThumbnailView. All Rights Reserved. Availability Available in OS X v10. the label of a thumbnail is the page number of the page it represents. 2007 Apple Inc. 2007-12-11 | © 2004. however. Availability Available in OS X v10. See Also – setBackgroundColor: (page 204) Declared in PDFThumbnailView. you must use selectedPages (page 203) to get the pages that correspond to the set of selected thumbnails. Discussion Typically. .PDFThumbnailView Class Reference Instance Methods When multiple selections are enabled.h backgroundColor Returns the color used in the background of the thumbnail view.5 and later.

See Also – setThumbnailSize: (page 206) Declared in PDFThumbnailView. If 0.h PDFView Returns the PDFView object associated with the thumbnail view.5 and later.h maximumNumberOfColumns Returns the maximum number of columns of thumbnails the thumbnail view can display. Availability Available in OS X v10. the thumbnail displays as many columns of thumbnails as fit in its size. . See Also – setPDFView: (page 206) 2007-12-11 | © 2004.(PDFView *)PDFView Return Value The PDF view object associated with the thumbnail view. Availability Available in OS X v10.5 and later. 2007 Apple Inc.5 and later.PDFThumbnailView Class Reference Instance Methods Availability Available in OS X v10. See Also – setLabelFont: (page 205) Declared in PDFThumbnailView.(NSUInteger)maximumNumberOfColumns Return Value The maximum number of columns of thumbnails the thumbnail view can display. . All Rights Reserved. 202 .

See Also – allowsDragging (page 200) 2007-12-11 | © 2004. Availability Available in OS X v10. Availability Available in OS X v10. 2007 Apple Inc. 203 .5 and later. re-order pages in the document. Discussion If the thumbnail view allows multiple selections (if allowsMultipleSelection (page 200) returns YES). All Rights Reserved.h selectedPages Returns an array of PDF pages that correspond to the selected thumbnails in the thumbnail view. or NO to disallow.(NSArray *)selectedPages Return Value An array of PDF pages that correspond to the thumbnails selected in the thumbnail view.h setAllowsDragging: Sets whether users can drag thumbnails within the thumbnail view.PDFThumbnailView Class Reference Instance Methods Declared in PDFThumbnailView. . See Also (page 200) – setAllowsDragging: (page 203) – allowsMultipleSelection Declared in PDFThumbnailView.5 and later. you can use this method to get the PDF pages that correspond to the selected thumbnails. that is.(void)setAllowsDragging:(BOOL)allow Parameters allow Pass YES to allow users to drag thumbnails in the thumbnail view (this allows them to re-order pages in the document). .

2007 Apple Inc.(void)setAllowsMultipleSelection:(BOOL)flag Parameters flag Pass YES to allows users to select multiple thumbnails at one time. 2007-12-11 | © 2004. All Rights Reserved. however. . you can get the PDF page that corresponds to the selected thumbnail using the PDFView method currentPage (page 224).h setAllowsMultipleSelection: Sets whether the thumbnail view allows users to select more than one thumbnail at a time. See Also – allowsMultipleSelection – selectedPages (page 200) (page 203) Declared in PDFThumbnailView. 204 . or NO to disallow.h setBackgroundColor: Sets the color used in the background of the thumbnail view. When this is the case. Availability Available in OS X v10. PDFThumbnailView allows only a single thumbnail to be selected at one time. If you use setAllowsMultipleSelection to enable multiple selections.5 and later. Discussion By default.PDFThumbnailView Class Reference Instance Methods Declared in PDFThumbnailView.(void)setBackgroundColor:(NSColor *)color Parameters color The color to be used in the background of the thumbnail view. you must use selectedPages (page 203) to get the pages that correspond to the set of selected thumbnails. .

Discussion Typically.PDFThumbnailView Class Reference Instance Methods Availability Available in OS X v10.(void)setMaximumNumberOfColumns:(NSUInteger)maxColumns Parameters maxColumns The maximum number of columns of thumbnails the thumbnail view can display. See Also – backgroundColor (page 201) Declared in PDFThumbnailView. Pass 0 to make the thumbnail view display as many columns as fit in its size. 2007 Apple Inc.5 and later.h setLabelFont: Sets the font used to label the thumbnails.h setMaximumNumberOfColumns: Sets the maximum number of columns of thumbnails the thumbnail view can display. . 205 .(void)setLabelFont:(NSFont *)font Parameters font The font to be used in the thumbnail labels. the label of a thumbnail is the page number of the page it represents. Availability Available in OS X v10. See Also – labelFont (page 201) Declared in PDFThumbnailView. All Rights Reserved. 2007-12-11 | © 2004.5 and later. .

See Also – PDFView (page 202) Declared in PDFThumbnailView. . 206 . 2007 Apple Inc. Availability Available in OS X v10.5 and later.5 and later. See Also – thumbnailSize (page 207) Declared in PDFThumbnailView.h setPDFView: Associates the specified PDFView object with the thumbnail view. . All Rights Reserved. Availability Available in OS X v10.h setThumbnailSize: Sets the maximum width and height of the thumbnails in the thumbnail view.5 and later.(void)setThumbnailSize:(NSSize)size Parameters size The maximum width and height the thumbnails in the thumbnail view should be.PDFThumbnailView Class Reference Instance Methods Availability Available in OS X v10. See Also – thumbnailSize (page 207) 2007-12-11 | © 2004.(void)setPDFView:(PDFView *)view Parameters view The PDF view object to associate with the thumbnail view.

h 2007-12-11 | © 2004.h thumbnailSize Returns the maximum width and height of the thumbnails in the thumbnail view. . See Also – setThumbnailSize: (page 206) Declared in PDFThumbnailView. Availability Available in OS X v10.(NSSize)thumbnailSize Return Value The maximum width and height of the thumbnails in the thumbnail view. All Rights Reserved. 2007 Apple Inc.5 and later. 207 .PDFThumbnailView Class Reference Instance Methods Declared in PDFThumbnailView.

2007 Apple Inc. 208 .framework PDFKit/PDFView.PDFView Class Reference Inherits from Conforms to NSView : NSResponder : NSObject NSAnimationDelegate NSAnimatablePropertyContainer (NSView) NSUserInterfaceItemIdentification (NSView) NSDraggingDestination (NSView) NSCoding (NSResponder) NSObject (NSObject) Framework Declared in Availability Related sample code Library/Frameworks/Quartz. PDFView also keeps track of page history. and copy textual content to the Pasteboard. You can also create a custom PDF viewer by using the PDF Kit utility classes directly and not using PDFView at all. navigate through a document. 2007-12-11 | © 2004.framework/Frameworks/PDFKit.4 and later. PDFView may be the only class you need to deal with for adding PDF functionality to your application. You can subclass PDFView to create a custom PDF viewer. It lets you display PDF data and allows users to select content. Link Snoop PDF Annotation Editor PDF Calendar Overview A PDFView object encapsulates the functionality of PDF Kit into a single widget that you can add to your application using Interface Builder. All Rights Reserved. set zoom level.h Available in OS X v10.

(page 223) Returns a PDFDestination object representing the current page and the current point in the view specified in page space. (page 224) Returns the current page. (page 242) Associates a document with a PDFView object. 2007 Apple Inc. (page 218) Returns a Boolean value indicating whether the user can navigate to the last page of the document. (page 230) Navigates to the first page of the document. 209 .PDFView Class Reference Tasks Tasks Associating a Document with a View – document (page 227) Returns the document associated with a PDFView object. (page 217) Returns a Boolean value indicating whether the user can navigate to the next page in the page history. – canGoForward – canGoToFirstPage – canGoToLastPage – canGoToNextPage – canGoToPreviousPage – currentPage – currentDestination – goBack: – goForward: – goToFirstPage: 2007-12-11 | © 2004. All Rights Reserved. (page 218) Returns a Boolean value indicating whether the user can navigate to the first page of the document. (page 229) Navigates forward one step in the page history. (page 228) Navigates back one step in the page history. – setDocument: Navigating Within a Document – canGoBack (page 217) Returns a Boolean value indicating whether the user can navigate to the previous page in the page history. (page 219) Returns a Boolean value indicating whether the user can navigate to the previous page of the document. (page 219) Returns a Boolean value indicating whether the user can navigate to the next page of the document.

(page 242) Toggles the display of page breaks. (page 225) Returns the current style of display box. (page 232) Scrolls to the first character of the specified selection. (page 231) Scrolls to the specified page. (page 226) Returns the current display mode. – goToNextPage: – goToPreviousPage: – goToPage: – goToDestination: – goToSelection: – goToRect:onPage: Working with Display Modes and Characteristics – setDisplayMode: (page 241) Sets the display mode for the view. (page 231) Navigates to the previous page of the document. – displayMode – setDisplaysPageBreaks: – displaysPageBreaks – setDisplayBox: – displayBox – displaysAsBook – setDisplaysAsBook: 2007-12-11 | © 2004. (page 240) Specifies the box to display and to clip to. (page 226) Returns a Boolean value indicating whether the view will display the first page as a book cover (meaningful only when the document is in two-up or two-up continuous display mode). All Rights Reserved.PDFView Class Reference Tasks – goToLastPage: (page 230) Navigates to the last page of the document. 2007 Apple Inc. (page 232) Navigates to the specified rectangle on the specified page. (page 226) Returns a Boolean value indicating whether the view is displaying page breaks. (page 241) Specifies whether the view should treat the document’s first page as a book cover. 210 . (page 229) Navigates to the specified destination. (page 231) Navigates to the next page of the document.

2007 Apple Inc. All Rights Reserved. (page 236) Returns the current scale factor for the view. (page 217) Returns the view’s background color. – shouldAntiAlias – setGreekingThreshold: – greekingThreshold – takeBackgroundColorFrom: – setBackgroundColor: – backgroundColor Setting the Delegate – setDelegate: (page 240) Sets a delegate for the view. zoom in. – delegate Scaling the View – setScaleFactor: (page 243) Sets the scale factor for the view. 211 . – scaleFactor – zoomIn: – canZoomIn – zoomOut: 2007-12-11 | © 2004. (page 238) Sets the view’s background color.PDFView Class Reference Tasks – setShouldAntiAlias: (page 244) Specifies whether to use anti-aliasing in the view. (page 225) Returns the view’s delegate. (page 246) Zooms in by increasing the scaling factor. (page 242) Sets the greeking threshold to use for displaying text. (page 246) Zooms out by decreasing the scaling factor. (page 220) Returns a Boolean value indicating whether the user can magnify the view—that is. (page 233) Returns the current greeking threshold for the view. (page 245) Sets the view’s background color to the specified color. (page 244) Returns a Boolean value indicating whether the view is anti-aliased.

(page 220) Clears the selection. (page 237) Toggles whether the scaling factor applied to a view automatically responds to resizing. if desired. zoom out. – clearSelection – copy: – scrollSelectionToVisible: – setCurrentSelection:animate: 2007-12-11 | © 2004. (page 216) Returns a Boolean value indicating whether autoscaling is set. – setAutoScales: – autoScales Working with Mouse Position and Events – areaOfInterestForMouse: (page 216) Returns the type of area the mouse cursor is over. if any. (page 236) Scrolls the view until the selection is visible.PDFView Class Reference Tasks – canZoomOut (page 220) Returns a Boolean value indicating whether the user can view an expanded area—that is. (page 223) Copies the text in the selection. (page 238) Sets the selection. – setCurrentSelection: – selectAll: (page 237) Selects all text in the document. 212 . 2007 Apple Inc. – setCursorForAreaOfInterest: – performAction: Handling Selections – currentSelection (page 224) Returns the current selection. All Rights Reserved. to the Pasteboard. (page 239) Sets the type of mouse cursor according to the type of area the mouse cursor is over. (page 234) Performs the specified action. in an animated way. (page 239) Sets the selection.

(page 221) Converts a point from view space to page space. (page 222) Converts a rectangle from view space to page space. 2007 Apple Inc. Rendering the View and Printing – drawPage: (page 228) For use by subclasses of PDFView for custom rendering of pages. – convertPoint:toPage: – convertRect:toPage: – convertPoint:fromPage: – convertRect:fromPage: 2007-12-11 | © 2004. (page 221) Converts a point from page space to view space. (page 228) For use by subclasses of PDFView for post-page rendering. All Rights Reserved. 213 . (page 222) Converts a rectangle from page space to view space. (page 235) Prints the document with the specified printer information. (page 235) Prints the document with the specified printer and page-scaling information. – highlightedSelections Setting the Password – takePasswordFrom: (page 245) A convenience method that calls – [[self document] setpassword:] with the password from the specified sender.PDFView Class Reference Tasks – setHighlightedSelections: (page 243) Highlights the specified array of selections. (page 233) Returns the array of selections that are highlighted using setHighlightedSelections. – drawPagePost: – printWithInfo:autoRotate: – printWithInfo:autoRotate:pageScaling: Conversion Methods for Subclasses – pageForPoint:nearest: (page 234) Returns the page containing a point specified in view coordinates.

(page 237) Specifies whether the view can accept drags. Handling URL Links – PDFViewWillClickOnLink:withURL: (page 249) delegate method Delegate method for handling clicks on URL links in a view. – rowSizeForPage: – layoutDocumentView – allowsDragging – setAllowsDragging: – visiblePages – annotationsChangedOnPage: Managing Scale Factor – PDFViewWillChangeScaleFactor:toScale: (page 249) delegate method Delegate method for overriding changes to scale factor. Responding to Annotation Actions – PDFViewPerformFind: (page 247) delegate method Delegate method that performs a find operation. 2007-12-11 | © 2004.PDFView Class Reference Tasks Miscellaneous Methods – documentView (page 227) Returns the innermost view used by PDFView or by your PDFView subclass. (page 236) Returns the size needed to display a row of the current document page. (page 215) Determines whether the view can accept new PDF documents dragged into it by the user. All Rights Reserved. (page 215) Tells the PDF view that an annotation on the specified page has changed. (page 233) Performs layout of the inner views. (page 245) Returns an array of PDFPage objects that represent the currently visible pages. – PDFViewPerformGoToPage: (page 248) delegate method Delegate method that performs a go-to operation. 214 . 2007 Apple Inc.

5 and later. Availability Available in OS X v10.PDFView Class Reference Instance Methods – PDFViewPerformPrint: (page 248) delegate method Delegate method that prints the current document.(BOOL)allowsDragging Availability Available in OS X v10.h annotationsChangedOnPage: Tells the PDF view that an annotation on the specified page has changed. 2007 Apple Inc. All Rights Reserved.4 and later. it rescans for tool tips and pop-ups and informs the PDFThumbailView objects so the thumbnail images can be redrawn. 215 . . – PDFViewOpenPDF:forRemoteGoToAction: (page 247) delegate method Delegate method that opens a specified page. Changing the Print Job Title – PDFViewPrintJobTitle: (page 248) delegate method Delegate method that overrides the job title used when the PDFView is printed. Instance Methods allowsDragging Determines whether the view can accept new PDF documents dragged into it by the user. 2007-12-11 | © 2004. See Also – setAllowsDragging: (page 237) Declared in PDFView. .(void)annotationsChangedOnPage:(PDFPage *)page Discussion When the PDFView object receives this message.

216 .PDFView Class Reference Instance Methods Declared in PDFView. 2007 Apple Inc. Refer to “Constants” (page 249) for the various values of the area-of-interest constants.(BOOL)autoScales Availability Available in OS X v10.h 2007-12-11 | © 2004. Availability Available in OS X v10. See Also – setCursorForAreaOfInterest: (page 239) Declared in PDFView. This method is for custom subclasses of the PDFView class.h areaOfInterestForMouse: Returns the type of area the mouse cursor is over.4 and later. Use it if you override the NSResponder class’s mouseMoved: method or related methods. .(PDFAreaOfInterest)areaOfInterestForMouse:(NSEvent *)theEvent Discussion The PDFAreaOfInterest enumeration defines the various area types.4 and later. All Rights Reserved. .h autoScales Returns a Boolean value indicating whether autoscaling is set. See Also – setAutoScales: (page 237) Declared in PDFView. Each of these constants contributes to the value of the PDFAreaOfInterest bit field.

2007 Apple Inc.(NSColor *)backgroundColor Discussion A view’s background is the area displayed to either side of a PDF document’s pages. Availability Available in OS X v10. .h canGoForward Returns a Boolean value indicating whether the user can navigate to the next page in the page history.4 and later.4 and later. .PDFView Class Reference Instance Methods backgroundColor Returns the view’s background color. Availability Available in OS X v10. The default color is a 50% gray.(BOOL)canGoBack Discussion The page history gets built as your application calls navigation methods such as goToDestination: (page 229) and goToLastPage: (page 230). See Also (page 245) – setBackgroundColor: (page 238) – takeBackgroundColorFrom: Declared in PDFView. All Rights Reserved. See Also – goBack: (page 228) Declared in PDFView.(BOOL)canGoForward 2007-12-11 | © 2004. 217 . . The background also appears between pages when page breaks are enabled.h canGoBack Returns a Boolean value indicating whether the user can navigate to the previous page in the page history.

4 and later. All Rights Reserved.4 and later.h canGoToFirstPage Returns a Boolean value indicating whether the user can navigate to the first page of the document. 2007 Apple Inc.(BOOL)canGoToFirstPage Discussion The return value will be YES unless the view is already displaying the first page. 218 . See Also – goToFirstPage: (page 230) Declared in PDFView. Availability Available in OS X v10.h canGoToLastPage Returns a Boolean value indicating whether the user can navigate to the last page of the document. .(BOOL)canGoToLastPage Discussion The return value will be YES unless the view is already displaying the last page. See Also – goForward: (page 229) Declared in PDFView. Availability Available in OS X v10.4 and later.PDFView Class Reference Instance Methods Discussion The page history gets built as your application calls navigation methods such as goToDestination: (page 229) and goToLastPage: (page 230). 2007-12-11 | © 2004. Availability Available in OS X v10. .

h canGoToPreviousPage Returns a Boolean value indicating whether the user can navigate to the previous page of the document. See Also – canGoToPreviousPage (page 219) Declared in PDFView. 2007 Apple Inc. 219 . .4 and later.(BOOL)canGoToPreviousPage Discussion The return value will be YES unless the view is displaying the first page. .4 and later.(BOOL)canGoToNextPage Discussion The return value will be YES unless the view is displaying the last page. See Also – goToNextPage: (page 231) Declared in PDFView.h 2007-12-11 | © 2004.h canGoToNextPage Returns a Boolean value indicating whether the user can navigate to the next page of the document. All Rights Reserved.PDFView Class Reference Instance Methods See Also – goToLastPage: (page 230) Declared in PDFView. Availability Available in OS X v10. Availability Available in OS X v10.

zoom out.4 and later.h canZoomOut Returns a Boolean value indicating whether the user can view an expanded area—that is. 220 . .4 and later. 2007 Apple Inc. .(void)clearSelection Discussion The view redraws as necessary but does not scroll. All Rights Reserved. .h clearSelection Clears the selection. This call is equivalent to calling [PDFView setCurrentSelection:NULL].PDFView Class Reference Instance Methods canZoomIn Returns a Boolean value indicating whether the user can magnify the view—that is.(BOOL)canZoomOut Availability Available in OS X v10. zoom in.(BOOL)canZoomIn Availability Available in OS X v10. 2007-12-11 | © 2004. See Also (page 246) – canZoomIn (page 220) – zoomOut: (page 246) – zoomIn: Declared in PDFView. See Also (page 246) – zoomOut: (page 246) – canZoomOut (page 220) – zoomIn: Declared in PDFView.

PDFView Class Reference Instance Methods

Availability Available in OS X v10.4 and later. See Also (page 224), – setCurrentSelection: (page 238)
– currentSelection

Declared in
PDFView.h

convertPoint:fromPage:
Converts a point from page space to view space.
- (NSPoint)convertPoint:(NSPoint)point fromPage:(PDFPage *)page

Discussion Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. View space is a coordinate system with the origin at the lower-left corner of the current PDF view. Availability Available in OS X v10.4 and later. See Also (page 221) – convertRect:toPage: (page 222) – convertRect:fromPage: (page 222) – pageForPoint:nearest: (page 234)
– convertPoint:toPage:

Declared in
PDFView.h

convertPoint:toPage:
Converts a point from view space to page space.
- (NSPoint)convertPoint:(NSPoint)point toPage:(PDFPage *)page

Discussion Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. View space is a coordinate system with the origin at the lower-left corner of the current PDF view.

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

221

PDFView Class Reference Instance Methods

Availability Available in OS X v10.4 and later. See Also (page 222) – convertPoint:fromPage: (page 221) – convertRect:fromPage: (page 222)
– convertRect:toPage:

Declared in
PDFView.h

convertRect:fromPage:
Converts a rectangle from page space to view space.
- (NSRect)convertRect:(NSRect)rect fromPage:(PDFPage *)page

Discussion Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. View space is a coordinate system with the origin at the lower-left corner of the current PDF view. Availability Available in OS X v10.4 and later. See Also (page 221) – convertRect:toPage: (page 222) – convertPoint:fromPage: (page 221)
– convertPoint:toPage:

Related Sample Code PDF Annotation Editor

Declared in
PDFView.h

convertRect:toPage:
Converts a rectangle from view space to page space.
- (NSRect)convertRect:(NSRect)rect toPage:(PDFPage *)page

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

222

PDFView Class Reference Instance Methods

Discussion Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. View space is a coordinate system with the origin at the lower-left corner of the current PDF view. Availability Available in OS X v10.4 and later. See Also (page 221) – convertPoint:fromPage: (page 221) – convertRect:fromPage: (page 222)
– convertPoint:toPage:

Declared in
PDFView.h

copy:
Copies the text in the selection, if any, to the Pasteboard.
- (void)copy:(id)sender

Availability Available in OS X v10.4 and later. See Also
– currentSelection

(page 224)

Declared in
PDFView.h

currentDestination
Returns a PDFDestination object representing the current page and the current point in the view specified in page space.
- (PDFDestination *)currentDestination

Discussion Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. Availability Available in OS X v10.4 and later.

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

223

PDFView Class Reference Instance Methods

See Also
– currentPage – goToDestination:

(page 224) (page 229) (PDFDestination)

Declared in
PDFView.h

currentPage
Returns the current page.
- (PDFPage *)currentPage

Discussion When there are two pages in the view in a two-up mode, “current page” is the left page. For continuous modes, returns the page crossing a horizontal line halfway between the view’s top and bottom bounds. Availability Available in OS X v10.4 and later. See Also (page 223) – goToDestination: (page 229)
– currentDestination

Declared in
PDFView.h

currentSelection
Returns the current selection.
- (PDFSelection *)currentSelection

Discussion Returns NULL if no selection exists. Note that this method returns the actual instance of the current PDFSelection object. Therefore, if you want to modify it, you should make a copy of the returned selection and modify that, instead. Availability Available in OS X v10.4 and later.

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

224

PDFView Class Reference Instance Methods

See Also (page 238) – clearSelection (page 220)
– setCurrentSelection:

Declared in
PDFView.h

delegate
Returns the view’s delegate.
- (id)delegate

Availability Available in OS X v10.4 and later. See Also
– setDelegate:

(page 240)

Declared in
PDFView.h

displayBox
Returns the current style of display box.
- (PDFDisplayBox)displayBox

Discussion The available values for display boxes are defined in the Constants section in the PDFPage class. Availability Available in OS X v10.4 and later. See Also
– setDisplayBox:

(page 240)

Related Sample Code Link Snoop PDF Annotation Editor

Declared in
PDFView.h

2007-12-11 | © 2004, 2007 Apple Inc. All Rights Reserved.

225

(BOOL)displaysPageBreaks Availability Available in OS X v10.h displaysPageBreaks Returns a Boolean value indicating whether the view is displaying page breaks. All Rights Reserved. 2007 Apple Inc. 2007-12-11 | © 2004. . See Also – setDisplayMode: (page 241) Declared in PDFView.4 and later. Availability Available in OS X v10.(BOOL)displaysAsBook Availability Available in OS X v10. 226 .PDFView Class Reference Instance Methods displayMode Returns the current display mode.4 and later. See Also – setDisplaysAsBook: (page 241) Declared in PDFView.h displaysAsBook Returns a Boolean value indicating whether the view will display the first page as a book cover (meaningful only when the document is in two-up or two-up continuous display mode). .4 and later.(PDFDisplayMode)displayMode Discussion See “Constants” (page 249) for possible values. .

See Also – setDocument: (page 242) Related Sample Code PDF Annotation Editor Declared in PDFView.h document Returns the document associated with a PDFView object.4 and later. 2007 Apple Inc.PDFView Class Reference Instance Methods See Also – setDisplaysPageBreaks: (page 242) Declared in PDFView. All Rights Reserved.4 and later. .(NSView *)documentView Discussion The innermost view is the one displaying the visible document pages. This method is useful when converting coordinates from one view to another.(PDFDocument *)document Availability Available in OS X v10. . See Also – layoutDocumentView (page 233) Declared in PDFView. Availability Available in OS X v10. 227 .h 2007-12-11 | © 2004.h documentView Returns the innermost view used by PDFView or by your PDFView subclass.

calls [page drawInRect: pageRect withBox: [self displayBox]] .h drawPagePost: For use by subclasses of PDFView for post-page rendering. except by invoking it on super from a subclass. . Declared in PDFView. The PDFView class calls drawPage: (page 228) as necessary for each visible page that requires rendering. and then draws the selection. 228 . Availability Available in OS X v10. this method erases page to white.4 and later.5 and later. the context is in view-space coordinates (in which the origin is at the lower-left corner of the current PDF view). invoke this method on super and then perform custom drawing on top of the PDF page. Declared in PDFView. In these cases.PDFView Class Reference Instance Methods drawPage: For use by subclasses of PDFView for custom rendering of pages.h goBack: Navigates back one step in the page history. This method does not apply scaling or rotating to the current context to map to page space.(void)drawPagePost:(PDFPage *)page Discussion The default implementation of this method draws the text highlighting (if any) for the page. 2007-12-11 | © 2004. instead.(void)drawPage:(PDFPage *)page Discussion Do not invoke this method. 2007 Apple Inc. if any. All Rights Reserved. Availability Available in OS X v10. . In the PDFView class. You can override this method to draw on top of a PDF page or to control how pages are drawn.

(IBAction)goForward:(id)sender Discussion The page history gets built as your application calls navigation methods such as goToDestination: (page 229) and goToLastPage: (page 230). Availability Available in OS X v10.(void)goToDestination:(PDFDestination *)destination Discussion Destinations include a page and a point on the page specified in page space. See Also – canGoBack (page 217) Declared in PDFView. 229 .4 and later. All Rights Reserved.h goForward: Navigates forward one step in the page history.PDFView Class Reference Instance Methods . .h goToDestination: Navigates to the specified destination. .(IBAction)goBack:(id)sender Discussion The page history gets built as your application calls navigation methods such as goToDestination: (page 229) and goToLastPage: (page 230). 2007 Apple Inc. 2007-12-11 | © 2004. Availability Available in OS X v10.4 and later. See Also – canGoForward (page 217) Declared in PDFView.

All Rights Reserved. See Also – canGoToFirstPage (page 218) Declared in PDFView. 2007 Apple Inc.PDFView Class Reference Instance Methods Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. Availability Available in OS X v10.h goToLastPage: Navigates to the last page of the document.h goToFirstPage: Navigates to the first page of the document.4 and later. . Availability Available in OS X v10.4 and later. . 2007-12-11 | © 2004. Availability Available in OS X v10.(IBAction)goToFirstPage:(id)sender Discussion PDF Kit records the move in its page history.4 and later. See Also (page 223) (PDFDestination) – currentPage (page 224) – currentDestination Declared in PDFView. 230 .(IBAction)goToLastPage:(id)sender Discussion PDF Kit records the move in its page history.

All Rights Reserved.h goToPreviousPage: Navigates to the previous page of the document.h goToNextPage: Navigates to the next page of the document.4 and later.h goToPage: Scrolls to the specified page. Availability Available in OS X v10. 2007-12-11 | © 2004. 231 . .(IBAction)goToNextPage:(id)sender Discussion PDF Kit records the move in its page history.(void)goToPage:(PDFPage *)page Discussion PDF Kit records the move in its page history. .PDFView Class Reference Instance Methods See Also – canGoToLastPage (page 218) Declared in PDFView. 2007 Apple Inc. See Also – canGoToNextPage (page 219) Declared in PDFView.4 and later. Availability Available in OS X v10. Declared in PDFView.

All Rights Reserved. 2007-12-11 | © 2004. Availability Available in OS X v10.h goToRect:onPage: Navigates to the specified rectangle on the specified page.5 and later. Note that rect is specified in page-space coordinates. Availability Available in OS X v10.PDFView Class Reference Instance Methods . Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. because both of these objects have bounds methods that return an annotation or selection position in page space.(void)goToRect:(NSRect)rect onPage:(PDFPage *)page Discussion If the specified rectangle is already visible. 2007 Apple Inc.(void)goToSelection:(PDFSelection *)selection Discussion PDF Kit records the move in its page history. See Also – canGoToPreviousPage (page 219) Declared in PDFView. this method does nothing. .4 and later.h goToSelection: Scrolls to the first character of the specified selection. . Declared in PDFView. 232 .(IBAction)goToPreviousPage:(id)sender Discussion PDF Kit records the move in its page history. This allows you to scroll the PDFView object to a specific PDFAnnotation or PDFSelection object.

h layoutDocumentView Performs layout of the inner views. .4 and later. 233 . Declared in PDFView.h greekingThreshold Returns the current greeking threshold for the view.(void)layoutDocumentView 2007-12-11 | © 2004.(float)greekingThreshold Availability Available in OS X v10. See Also – setGreekingThreshold: (page 242) Declared in PDFView.(NSArray *)highlightedSelections Availability Available in OS X v10. .h highlightedSelections Returns the array of selections that are highlighted using setHighlightedSelections. 2007 Apple Inc. See Also – setHighlightedSelections: (page 243) Declared in PDFView.5 and later.PDFView Class Reference Instance Methods Availability Available in OS X v10.4 and later. . All Rights Reserved.

4 and later.PDFView Class Reference Instance Methods Discussion The PDFView actually contains several subviews. . such as the document view (where the PDF is actually drawn) and a “matte view” (which may appear as a gray area around the PDF content.(PDFPage *)pageForPoint:(NSPoint)point nearest:(BOOL)nearest Discussion Returns NULL if there’s no page at the specified point and nearest is set to NO. rotate a page. All Rights Reserved. Declared in PDFView.5 and later. 2007-12-11 | © 2004. depending on the scaling). This method is called automatically from PDFView methods that affect the visible layout (such as setDocument: (page 242). 234 . Changes to the PDF content may require changes to these inner views.h pageForPoint:nearest: Returns the page containing a point specified in view coordinates. so you must call this method explicitly if you use PDF Kit utility classes to add or remove a page. Availability Available in OS X v10. or perform other operations affecting visible layout. setDisplayBox: (page 240) or zoomIn: (page 246)).4 and later. . See Also – documentView (page 227) Declared in PDFView. Availability Available in OS X v10.(void)performAction:(PDFAction *)action Availability Available in OS X v10. 2007 Apple Inc.h performAction: Performs the specified action.

.4 and later. small pages are not scaled up to fit. 235 . See Also – printWithInfo:autoRotate:pageScaling: (page 235) Declared in PDFView.5 and later.(void)printWithInfo:(NSPrintInfo *)printInfo autoRotate:(BOOL)doRotate Discussion If autoRotate is set to YES.h printWithInfo:autoRotate:pageScaling: Prints the document with the specified printer and page-scaling information.(void)printWithInfo:(NSPrintInfo *)printInfo autoRotate:(BOOL)doRotate pageScaling:(PDFPrintScalingMode)scale Discussion If pageScaling is set to kPDFPrintPageScaleToFit.PDFView Class Reference Instance Methods Declared in PDFView. If pageScaling is set to kPDFPrintPageScaleDownToFit. then ths method ignores the orientation attribute in the NSPrintInfo object and instead chooses the orientation that best fits the page to the paper size. See Also – printWithInfo:autoRotate: (page 235) 2007-12-11 | © 2004. each page is scaled up or down to best fit the paper size. 2007 Apple Inc. All Rights Reserved. This orientation occurs on a page-by-page basis. Availability Available in OS X v10. See PDFDocument for more information on page-scaling types. Specifying kPDFPrintPageScaleNone for pageScaling is equivalent to calling printWithInfo:autoRotate: (page 235).h printWithInfo:autoRotate: Prints the document with the specified printer information. only large pages are scaled down to fit. Availability Available in OS X v10. .

h rowSizeForPage: Returns the size needed to display a row of the current document page.(void)scrollSelectionToVisible:(id)sender 2007-12-11 | © 2004. . 236 . All Rights Reserved. . .4 and later.h scrollSelectionToVisible: Scrolls the view until the selection is visible. See Also – setScaleFactor: (page 243) Related Sample Code PDF Annotation Editor Declared in PDFView.(NSSize)rowSizeForPage:(PDFPage *)page Discussion The size is dependent on the current scale factor and display attributes.PDFView Class Reference Instance Methods Declared in PDFView.(float)scaleFactor Availability Available in OS X v10. Declared in PDFView.4 and later. Availability Available in OS X v10. 2007 Apple Inc.h scaleFactor Returns the current scale factor for the view.

. and the old document is released. the user can drag a new PDF document into the view.(void)setAutoScales:(BOOL)newAuto 2007-12-11 | © 2004.4 and later.h selectAll: Selects all text in the document. Availability Available in OS X v10. See Also – allowsDragging (page 215) Declared in PDFView. 2007 Apple Inc. .4 and later.h setAutoScales: Toggles whether the scaling factor applied to a view automatically responds to resizing.4 and later. 237 . All Rights Reserved. Declared in PDFView.(void)setAllowsDragging:(BOOL)allow Discussion If set to YES. Declared in PDFView.(IBAction)selectAll:(id)sender Availability Available in OS X v10.PDFView Class Reference Instance Methods Availability Available in OS X v10. . The new document is then displayed in the view.h setAllowsDragging: Specifies whether the view can accept drags.

.4 and later.(void)setBackgroundColor:(NSColor *)newColor Discussion A view’s background is the area displayed to either side of a PDF document’s pages. 2007 Apple Inc.(void)setCurrentSelection:(PDFSelection *)selection 2007-12-11 | © 2004. See Also – takeBackgroundColorFrom: – backgroundColor (page 245) (page 217) Declared in PDFView. See Also – autoScales (page 216) Declared in PDFView. autoscaling provides best fit. 238 . in which the viewed pages are as large as possible while displaying in their entirety within the view. . Availability Available in OS X v10. All Rights Reserved.h setBackgroundColor: Sets the view’s background color.h setCurrentSelection: Sets the selection. The default color is a 50% gray.PDFView Class Reference Instance Methods Discussion When set to autoscaling. For the single-page and two-up continuous modes. the document scales to fill the PDFView object as the user resizes it. The background also appears between pages when page breaks are enabled. autoscaling fits the page to the width of the view.4 and later. For single-page and two-up noncontinuous modes. Availability Available in OS X v10.

in an animated way. this call is equivalent to calling clearSelection (page 220). Availability Available in OS X v10. . if animate is YES.h setCurrentSelection:animate: Sets the selection.h setCursorForAreaOfInterest: Sets the type of mouse cursor according to the type of area the mouse cursor is over. See Also – setCurrentSelection:animate: (page 239) (page 224) – clearSelection (page 220) – currentSelection Declared in PDFView. if desired. If you pass nil for the selection. Availability Available in OS X v10. 2007 Apple Inc.5 and later.(void)setCursorForAreaOfInterest:(PDFAreaOfInterest)area 2007-12-11 | © 2004. but with the addition of animation. 239 . use scrollSelectionToVisible: (page 236).4 and later. All Rights Reserved. . If you need to scroll to the current selection. The animation serves to draw the user’s attention to the new selection. which can be useful when implementing search.(void)setCurrentSelection:(PDFSelection *)selection animate:(BOOL)animate Discussion This method behaves as setCurrentSelection: (page 238). See Also – setCurrentSelection: – clearSelection (page 238) (page 220) Declared in PDFView.PDFView Class Reference Instance Methods Discussion The view redraws as necessary but does not scroll.

h setDisplayBox: Specifies the box to display and to clip to. 240 . Availability Available in OS X v10. The available values for display boxes are defined in the Constants section in the PDFPage class. All Rights Reserved.4 and later. 2007-12-11 | © 2004. . .(void)setDisplayBox:(PDFDisplayBox)box Discussion The values for box are defined in the PDFDisplayBox enumeration. 2007 Apple Inc.PDFView Class Reference Instance Methods Discussion This method is especially useful for custom subclasses of the PDFView class. See Also – delegate (page 225) Declared in PDFView.4 and later. See Also – areaOfInterestForMouse: (page 216) Declared in PDFView. The default value for this method is kPDFDisplayBoxCropBox.4 and later.(void)setDelegate:(id)anObject Availability Available in OS X v10. Availability Available in OS X v10.h setDelegate: Sets a delegate for the view.

. All Rights Reserved.4 and later. See Also – displaysAsBook (page 226) Declared in PDFView. two-up. as defined in “Constants” (page 249). Availability Available in OS X v10.(void)setDisplaysAsBook:(BOOL)asBook Discussion For two-up modes.h setDisplaysAsBook: Specifies whether the view should treat the document’s first page as a book cover. 2007 Apple Inc.(void)setDisplayMode:(PDFDisplayMode)mode Discussion Available display modes are single page. a YES value for this method specifies that the first page should be displayed by itself.4 and later.PDFView Class Reference Instance Methods See Also – displayBox (page 225) Declared in PDFView. and two-up continuous. single-page continuous.h 2007-12-11 | © 2004. . Availability Available in OS X v10. 241 .h setDisplayMode: Sets the display mode for the view. See Also – displayMode (page 226) Declared in PDFView.

All Rights Reserved. .PDFView Class Reference Instance Methods setDisplaysPageBreaks: Toggles the display of page breaks. 242 . See Also – document (page 227) Related Sample Code PDF Annotation Editor PDF Calendar Declared in PDFView. See Also – displaysPageBreaks (page 226) Declared in PDFView.(void)setGreekingThreshold:(float)threshold 2007-12-11 | © 2004.4 and later. . 2007 Apple Inc.h setDocument: Associates a document with a PDFView object.(void)setDisplaysPageBreaks:(BOOL)breaks Availability Available in OS X v10.(void)setDocument:(PDFDocument *)document Discussion If a document was already associated with the view. .4 and later.h setGreekingThreshold: Sets the greeking threshold to use for displaying text. Availability Available in OS X v10. it is released first and then document is associated with the view.

2007 Apple Inc. appear deselected) when users click elsewhere in the view or document. .0. it is recommended that you use a highlight color that is different from the user’s default text selection color.h setHighlightedSelections: Highlights the specified array of selections. . All Rights Reserved.4 and later. Availability Available in OS X v10. for example. Availability Available in OS X v10. setCurrentSelection: (page 238)). To prevent the user from confusing their own selections with selections you set using this method. See Also – greekingThreshold (page 233) Declared in PDFView.(void)setScaleFactor:(float)scale 2007-12-11 | © 2004. to deselect the selections.(void)setHighlightedSelections:(NSArray *)selections Discussion Unlike the selections users set (using.PDFView Class Reference Instance Methods Discussion The default threshold is 3. the selections you specify in this method do not go away (that is.5 and later. 243 . See Also – highlightedSelections (page 233) Declared in PDFView.h setScaleFactor: Sets the scale factor for the view. Instead. you must call [setHighlightedSelections:NULL] to remove them. You might use this method to highlight the set of matches from a text search.

.4 and later. See Also – shouldAntiAlias (page 244) Declared in PDFView. See Also – setShouldAntiAlias: (page 244) 2007-12-11 | © 2004. Availability Available in OS X v10.h shouldAntiAlias Returns a Boolean value indicating whether the view is anti-aliased. 2007 Apple Inc. corresponding to actual size.(void)setShouldAntiAlias:(BOOL)aliasing Discussion The default value is YES.PDFView Class Reference Instance Methods Discussion The default value is 1. All Rights Reserved. See Also – scaleFactor (page 236) Declared in PDFView. 244 .4 and later.4 and later.0.(BOOL)shouldAntiAlias Availability Available in OS X v10. .h setShouldAntiAlias: Specifies whether to use anti-aliasing in the view. Availability Available in OS X v10.

The background also appears between pages when page breaks are enabled.(void)takePasswordFrom:(id)sender Availability Available in OS X v10. . 2007 Apple Inc.4 and later. All Rights Reserved. .h takeBackgroundColorFrom: Sets the view’s background color to the specified color. Declared in PDFView.4 and later. The default color is a 50% gray. See Also (page 238) – backgroundColor (page 217) – setBackgroundColor: Declared in PDFView.PDFView Class Reference Instance Methods Declared in PDFView.h takePasswordFrom: A convenience method that calls – [[self document] setpassword:] with the password from the specified sender. Availability Available in OS X v10. 245 .h visiblePages Returns an array of PDFPage objects that represent the currently visible pages.(NSArray *)visiblePages 2007-12-11 | © 2004. .(IBAction)takeBackgroundColorFrom:(id)sender Discussion A view’s background is the area displayed to either side of a PDF document’s pages.

2007 Apple Inc. See Also (page 246) – canZoomIn (page 220) – canZoomOut (page 220) – zoomIn: 2007-12-11 | © 2004. Availability Available in OS X v10. .5 and later. Declared in PDFView. All Rights Reserved.h zoomIn: Zooms in by increasing the scaling factor. 246 .(IBAction)zoomOut:(id)sender Discussion Each invocation of zoomOut divides the scaling factor by the square root of 2. See Also (page 220) – zoomOut: (page 246) – canZoomOut (page 220) – canZoomIn Declared in PDFView. .(IBAction)zoomIn:(id)sender Discussion Each invocation of zoomIn muliplies the scaling factor by the square root of 2.PDFView Class Reference Instance Methods Availability Available in OS X v10.h zoomOut: Zooms out by decreasing the scaling factor.4 and later. Availability Available in OS X v10.4 and later.

. Declared in PDFView.h PDFViewPerformFind: Delegate method that performs a find operation.5 and later. Then. you can call goToDestination: (page 229). The default implementation of this method beeps. Such an action contains a URL. and a point.h 2007-12-11 | © 2004.h Delegate Methods PDFViewOpenPDF:forRemoteGoToAction: Delegate method that opens a specified page. Availability Available in OS X v10. 247 . Declared in PDFView.(void)PDFViewPerformFind:(PDFView *)sender Discussion Some PDFAction objects request a PDF viewer application to perform a find operation. 2007 Apple Inc. An easy way to do this is to create a PDFDocument object with the specified URL and then create a PDFDestination object with the specified page and point. The delegate should open the PDF document specified by the URL and go to the specified page and point.(void)PDFViewOpenPDF:(PDFView *)sender forRemoteGoToAction:(PDFActionRemoteGoTo *)action Discussion A delegate responding to this method is called to handle clicks in an annotation that contains a PDFActionRemoteGoTo action.5 and later. a page index. Availability Available in OS X v10.PDFView Class Reference Delegate Methods Declared in PDFView. A delegate responding to this method is called when users click an annotation with such an action. . All Rights Reserved.

A delegate responding to this method is called when users click an annotation with such an action.h PDFViewPerformPrint: Delegate method that prints the current document. A delegate responding to this method is called when users click an annotation with such an action. . Declared in PDFView. Availability Available in OS X v10. 2007-12-11 | © 2004.5 and later. 248 .PDFView Class Reference Delegate Methods PDFViewPerformGoToPage: Delegate method that performs a go-to operation.h PDFViewPrintJobTitle: Delegate method that overrides the job title used when the PDFView is printed. associated with the “Title” key in the view’s PDFDocument attribute dictionary. . If there is no such string.(NSString *)PDFViewPrintJobTitle:(PDFView *)sender Discussion By default. this method uses the last path component if the document is URL-based. 2007 Apple Inc.(void)PDFViewPerformGoToPage:(PDFView *)sender Discussion Some PDFAction objects request a PDF viewer application to display a panel that allows users to enter a page number to go to. Availability Available in OS X v10. if any. this method uses the string. All Rights Reserved. . Declared in PDFView.(void)PDFViewPerformPrint:(PDFView *)sender Discussion Some PDFAction objects request a PDF viewer application to print the current document.5 and later.

. Declared in PDFView. . See Also – setScaleFactor: (page 243) Declared in PDFView.PDFView Class Reference Constants Availability Available in OS X v10. 249 .4 and later.h PDFViewWillChangeScaleFactor:toScale: Delegate method for overriding changes to scale factor. the scale factor is restricted to a range between 0. this method calls [[NSWorkspace sharedWorkspace] openURL:url].5 and later.1 and 10.(void)PDFViewWillClickOnLink:(PDFView *)sender withURL:(NSURL *)url Discussion By default.h PDFViewWillClickOnLink:withURL: Delegate method for handling clicks on URL links in a view.h Constants PDF views use the following display mode constants: 2007-12-11 | © 2004.(float)PDFViewWillChangeScaleFactor:(PDFView *)sender toScale:(float)scale Discussion By default. Declared in PDFView.5 and later. Availability Available in OS X v10. Availability Available in OS X v10. All Rights Reserved.0 inclusive. 2007 Apple Inc.

PDFView Class Reference Constants Constant Description kPDFDisplaySinglePage The document displays one page at a time horizontally and vertically. Available in OS X v10.4 and later.4 and later.h. Declared in PDFView. with single-page width horizontally. Declared in PDFView. These constants are components of a bit field and may be combined arbitrarily: Constant Description kPDFNoArea The mouse is over an undefined area.4 and later. The following constants apply to mouse position over PDF view areas. Declared in PDFView. Declared in PDFView. Vertical and horizontal scrolling apply only to the pair of displayed pages Available in OS X v10. Vertical scrolling applies to the entire document.h. Available in OS X v10. Available in OS X v10. Declared in PDFView.4 and later. kPDFDisplaySinglePageContinuous The document displays in continuous mode vertically. Declared in PDFView. Vertical and horizontal scrolling apply only to the current page. All Rights Reserved. kPDFPageArea The mouse is over a page.4 and later. Vertical scrolling applies to the entire document. Available in OS X v10.h. Available in OS X v10.h. kPDFDisplayTwoUp The document displays two pages side-by-side.h.4 and later. 250 . 2007 Apple Inc.h. kPDFDisplayTwoUpContinuous The document displays in continuous mode vertically and displays two pages side-by-side horizontally. 2007-12-11 | © 2004.

h. Declared in PDFView. kPDFAnnotationArea The mouse is over an annotation. Available in OS X v10. 251 . Available in OS X v10. kPDFTextFieldArea The mouse is over a text field. 2007 Apple Inc. Available in OS X v10. kPDFPopupArea The mouse is over a popup menu.4 and later.h.4 and later.4 and later.PDFView Class Reference Notifications Constant Description kPDFTextArea The mouse is over text. Declared in PDFView.4 and later. All Rights Reserved.4 and later. Declared in PDFView. kPDFIconArea The mouse is over an icon. Available in OS X v10. kPDFLinkArea The mouse is over a link.h.h. Declared in PDFView.5 and later.h.h. Declared in PDFView. kPDFControlArea The mouse is over a control. Declared in PDFView. Declared in PDFView.h.4 and later. Notifications A PDFView object posts the following notifications: 2007-12-11 | © 2004. Available in OS X v10. Available in OS X v10. Available in OS X v10.

Availability Available in OS X v10. The notification object is the PDFView object itself. Declared in PDFView. The notification object is the PDFView object itself. The notification object is the PDFView object itself.h PDFViewScaleChangedNotification Posted when the scale factor changes. 252 .h PDFViewDocumentChangedNotification Posted when a new document is associated with the view. 2007 Apple Inc. All Rights Reserved.4 and later. 2007-12-11 | © 2004.4 and later. Declared in PDFView. Declared in PDFView. Availability Available in OS X v10. The notification object is the PDFView object itself.h PDFViewPageChangedNotification Posted when a new page becomes the current page.PDFView Class Reference Notifications PDFViewChangedHistoryNotification Posted when the page history changes. Availability Available in OS X v10.4 and later.

4 and later. The notification object is the PDFView object itself. Use the @"PDFAnnotationHit" key to obtain userinfo of type PDFAnnotation *. Availability Available in OS X v10. The notification object is the PDFView object itself.4 and later.4 and later. 2007 Apple Inc.4 and later.h 2007-12-11 | © 2004.h PDFViewCopyPermissionNotification Posted when the user attempts to copy to the pasteboard without the appropriate permissions. Declared in PDFView.h PDFViewAnnotationHitNotification Posted when the user clicks on an annotation. Declared in PDFView. Availability Available in OS X v10.PDFView Class Reference Notifications Availability Available in OS X v10. 253 .h PDFViewPrintPermissionNotification Posted when the user attempts to print without the appropriate permissions. All Rights Reserved. Availability Available in OS X v10. The notification object is the PDFView object itself. Declared in PDFView. Declared in PDFView.

5 and later. The notification object is the PDFView object itself. The notification object is the PDFView object itself. The notification object is the PDFView object itself. The notification object is the PDFView object itself. Declared in PDFView. Availability Available in OS X v10. All Rights Reserved. Declared in PDFView. Availability Available in OS X v10.5 and later.h PDFViewDisplayBoxChangedNotification Posted when the display box has changed. Availability Available in OS X v10.h PDFViewSelectionChangedNotification Posted when the current selection has changed. 2007 Apple Inc.5 and later.PDFView Class Reference Notifications PDFViewAnnotationWillHitNotification Posted before the user clicks an annotation. 254 . 2007-12-11 | © 2004.h PDFViewDisplayModeChangedNotification Posted when the display mode has changed. Declared in PDFView.

All Rights Reserved. 2007 Apple Inc. 255 .h 2007-12-11 | © 2004.5 and later. Declared in PDFView.PDFView Class Reference Notifications Availability Available in OS X v10.

Date 2007-12-11 Notes Updated to include information on new classes and methods introduced in OS X v10.5. Updated documentation of the PDFAnnotation and PDFDocument classes. 256 . Clarified that calling [PDFView setCurrentSelection:nil] is equivalent to calling[PDFView clearSelection].Document Revision History This table describes the changes to PDF Kit Reference Collection . 2007-06-08 2006-05-23 2005-11-09 2007-12-11 | © 2004. First publication of this content as a collection of separate documents. 2007 Apple Inc. All Rights Reserved.

Mac. Apple Inc. or addition to this warranty. SPECIAL.. IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT. mechanical. Quartz. with the following exceptions: Any person is hereby authorized to store documentation on a single computer for personal use only and to print copies of documentation for personal use provided that the documentation contains Apple’s copyright notice. Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages. THIS DOCUMENT IS PROVIDED “AS IS. WITH RESPECT TO THIS DOCUMENT. 1 Infinite Loop Cupertino. No Apple dealer. photocopying. Apple retains all intellectual property rights associated with the technology described in this document. . OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS DOCUMENT. THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS. All rights reserved. and Tiger are trademarks of Apple Inc. No part of this publication may be reproduced. INDIRECT. 2007 Apple Inc. Carbon. and PostScript are trademarks or registered trademarks of Adobe Systems Incorporated in the U. APPLE MAKES NO WARRANTY OR REPRESENTATION. even if advised of the possibility of such damages. Objective-C. Pages. ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND ACCURACY. EXPRESS OR IMPLIED. in any form or by any means. OS X. THE READER. ITS QUALITY. CA 95014 408-996-1010 Apple. or employee is authorized to make any modification.Apple Inc. No licenses. electronic. This warranty gives you specific legal rights. OR FITNESS FOR A PARTICULAR PURPOSE.S. and other countries. and/or other countries. Adobe. so the above limitation or exclusion may not apply to you. EITHER EXPRESS OR IMPLIED. © 2004.. or transmitted. agent. registered in the U. Cocoa. recording. are granted with respect to any of the technology described in this document. MERCHANTABILITY. AS A RESULT. ORAL OR WRITTEN. stored in a retrieval system. and you may also have other rights which vary from state to state. express or implied. Even though Apple has reviewed this document. ACCURACY. without prior written permission of Apple Inc.S.” AND YOU. INCIDENTAL. the Apple logo. Acrobat. or otherwise. extension. This document is intended to assist application developers to develop applications only for Apple-labeled computers.