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

Next Page > Hide TOC

PDFDestination Class Reference

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

Overview

A PDFDestination object describes a point on a PDF page.

In typical usage, you do not initialize PDFDestination objects but rather get them as either attributes of PDFAnnotationLink or PDFOutline objects, or in response to the PDFView method currentDestination.

Tasks

Initializing a Destination

Getting Pages and Points

Getting a Relative Location

Instance Methods

compare:

Returns a comparison result that indicates the location of the destination in the document, relative to the current position.

- (NSComparisonResult)compare:(PDFDestination *)destination

Parameters
destination

The destination in the document to be located.

Return Value

A comparison result, indicating the position of the passed-in destination relative to the current position.

Discussion

If destination is between the receiver’s position and the end of the document, compare returns NSOrderedAscending; if it is between the receiver’s position and the beginning of the document, compare returns NSOrderedDescending. Otherwise, if destination matches the receiver’s position, compare returns NSOrderedSame.

This method ignores the horizontal component of the destination point (the x value). If the destination’s vertical component (or y value) is kPDFDestinationUnspecifiedValue, compare treats the destination as if its y value is the top point on the destination page.

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.

Availability
Declared In
PDFDestination.h

initWithPage:atPoint:

Initializes the destination.

- (id)initWithPage:(PDFPage *)page atPoint:(NSPoint)point

Parameters
page

The page of the destination.

point

The point of the destination, in page space.

Return Value

An initialized PDFDestination instance, or NULL if the object could not be initialized.

Discussion

Specify point in page space. Typically, there’s no need to initialize destinations. Instead, you get them from PDFAnnotationLink, PDFOutline, or PDFView objects.

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

Availability
Declared In
PDFDestination.h

page

Returns the page that the destination refers to.

- (PDFPage *)page

Return Value

The page referred to by the destination.

Availability
See Also
Declared In
PDFDestination.h

point

Returns the point, in page space, that the destination refers to.

- (NSPoint)point

Return Value

The point, in page space, referred to by the destination.

Discussion

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

Availability
See Also
Declared In
PDFDestination.h

Constants

Constant

Description

kPDFDestinationUnspecifiedValue

Unspecified value used when a destination’s actual x or y value is unimportant.

Available in Mac OS X v10.5 and later.



Next Page > Hide TOC


Last updated: 2007-12-11




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

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

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

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