DL Logo

PDViewDest Definitions

PDViewDestNULL

Header: PDExpT.h:3342

Syntax

#define PDViewDestNULL fixedNegativeInfinity

PDViewDest Typedefs

PDViewDestination

Header: PDExpT.h:3337

Description

A particular view of a page in a document. It contains a reference to a page, a rectangle on that page, and information specifying how to adjust the view to fit the window's size and shape. It corresponds to a PDF Dest array and can be considered a special form of a PDAction.

Syntax

typedef OPAQUE_64_BITS PDViewDestination;

Returned From

Used By

PDViewDest Functions

PDViewDestCreate

Header: PDProcs.h:4416

Description

Creates a new view destination object. For information about the Zoom Factor see page 365 of the ISO 32000-1:2008, Document Management-Portable Document Format-Part 1: PDF 1.7. You can find this document on the web store of the International Standards Organization (ISO).

Syntax

PDViewDestination PDViewDestCreate(PDDoc doc, PDPage initialPage, ASAtom initialFitType, const ASFixedRectP initialRect, const ASFixed initialZoom, ASInt32 pageNumber);

Parameters

doc
The document in which the destination is used.
initialPage
The destination page.
initialFitType
The destination fit type. It must be one of the View Destination Fit Types, which must be converted into an ASAtom with ASAtomFromString().
initialRect
A pointer to an ASFixedRect specifying the destination rectangle, specified in user space coordinates. The appropriate information will be extracted from initialRect, depending on initialFitType, to create the destination. All four of the initialRect parameter's components should be set; using PDViewDestNULL for any components can result in incorrect results for rotated pages.
initialZoom
The zoom factor to set for the destination. Used only if initialFitType is XYZ. Use the predefined value PDViewDestNULL (see PDExpT.h) to indicate a NULL zoom factor, described in Destinations in "Document-Level Navigation," in the ISO 32000-1:2008, Document Management-Portable Document Format-Part 1: PDF 1.7, section 12.4.4, page 365.
pageNumber
Currently unused.

Returns

The newly created view destination.

PDViewDestDestroy

Header: PDProcs.h:4430

Description

Deletes a view destination object. Before deleting a view destination, ensure that no link or bookmark refers to it.

Syntax

void PDViewDestDestroy(PDViewDestination dest);

Parameters

dest
IN/OUT The view destination to destroy.

PDViewDestFromCosObj

Header: PDProcs.h:4501

Description

Converts the specified Cos object to a view destination and verifies that the view destination is valid. This method does not copy the object, but is instead the logical equivalent of a type cast.

Related Methods

Syntax

PDViewDestination PDViewDestFromCosObj(CosObj obj);

Parameters

obj
IN/OUT The dictionary Cos object to convert to a view destination.

Returns

An array Cos object for the view destination.

Exceptions

is raised if the destination is invalid, as determined by PDViewDestIsValid().

PDViewDestGetAttr

Header: PDProcs.h:4466

Description

Gets a view destination's fit type, destination rectangle, and zoom factor. The destination must be represented by an array, which is the case for a GoToR action.

Related Methods

Syntax

void PDViewDestGetAttr(PDViewDestination dest, ASInt32 *pageNum, ASAtom *fitType, ASFixedRectP destRect, ASFixed *zoom);

Parameters

dest
IN/OUT The view destination whose attributes are obtained.
pageNum
IN/OUT (Filled by the method) The page number of the destination's page.
fitType
IN/OUT (Filled by the method) The destination fit type. One of the values listed in View Destination Fit Types.
destRect
IN/OUT (Filled by the method) A pointer to a ASFixedRect containing the destination's rectangle, specified in user space coordinates.
zoom
IN/OUT (Filled by the method) The destination's zoom factor.

Exceptions

is raised if the destination is not represented by an array.

PDViewDestGetCosObj

Header: PDProcs.h:4485

Description

Gets the Cos object corresponding to a view destination and verifies that the view destination is valid. This method does not copy the object, but is instead the logical equivalent of a type cast.

Syntax

CosObj PDViewDestGetCosObj(PDViewDestination dest);

Parameters

dest
IN/OUT The view destination whose Cos object is obtained.

Returns

Array Cos object for the view destination. The contents of the array can be enumerated using CosObjEnum(). It returns a NULL Cos object if the view destination is invalid, as determined by PDViewDestIsValid().

PDViewDestIsValid

Header: PDProcs.h:4442

Description

Tests whether a view destination is valid. This is intended only to ensure that the view destination has not been deleted, not to ensure that all necessary information is present and valid.

Syntax

ASBool PDViewDestIsValid(PDViewDestination dest);

Parameters

dest
The view destination whose validity is determined.

Returns

true if the view destination is valid, false otherwise.

PDViewDestResolve

Header: PDProcs.h:5765

Description

Resolves a destination. dest is the value of the D key in an action. It can be a real destination (an array) or a name. If it is a name, look it up in the doc parameter's Dests dictionary. The value found there can be a real destination (an array) or a dictionary. If it is a dictionary, look up the D key in that dictionary.

This method is useful for getting a PDViewDestination from an action, as provided by PDActionGetDest(), since this method may not return a PDViewDestination.

This method can raise memory, I/O, and parsing exceptions.

Related Methods

Syntax

PDViewDestination PDViewDestResolve(PDViewDestination dest, PDDoc doc);

Parameters

dest
IN/OUT The destination to resolve.
doc
IN/OUT The PDDoc that contains the destination.

Returns

The resolved view destination.