Mac Developer Library

Developer

Quartz Framework Reference PDFDestination Class Reference

Options
Deployment Target:

On This Page
Language:

PDFDestination

Inheritance


Conforms To


Import Statement


Swift

import Quartz

Objective-C

@import Quartz;

Availability


Available in OS X v10.4 and later.

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.

  • Initializes the destination.

    Declaration

    Swift

    init!(page page: PDFPage!, atPoint point: NSPoint)

    Objective-C

    - (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.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.4 and later.

  • Returns the page that the destination refers to.

    Declaration

    Swift

    func page() -> PDFPage!

    Objective-C

    - (PDFPage *)page

    Return Value

    The page referred to by the destination.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.4 and later.

    See Also

    – point

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

    Declaration

    Swift

    func point() -> NSPoint

    Objective-C

    - (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.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.4 and later.

    See Also

    – page

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

    Declaration

    Swift

    func compare(_ destination: PDFDestination!) -> NSComparisonResult

    Objective-C

    - (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.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Value used for unspecified destination.

    Declaration

    Objective-C

    #define kPDFDestinationUnspecifiedValue FLT_MAX

    Constants

    • kPDFDestinationUnspecifiedValue

      kPDFDestinationUnspecifiedValue

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

      Available in OS X v10.5 and later.