Layer | PD_Layer |
Object | PDViewDest |
A PDViewDest represents 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 (see Named Destinations in Section 8.2, Document-Level Navigation, in the PDF Reference) and can be considered a special form of a PDAction.
PDViewDest provides a number of methods to get or set the attributes describing the location and size of the view, including the page, rectangle, and fit style.
Define | ||
---|---|---|
PDViewDestNULL |
Typedef | ||
---|---|---|
PDViewDestination
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.
|
Method | ||
---|---|---|
PDViewDestination PDViewDestCreate(PDDoc doc, PDPage initialPage, ASAtom initialFitType, const ASFixedRectP initialRect, const ASFixed initialZoom, ASInt32 pageNumber)
Creates a new view destination object.
|
||
void PDViewDestDestroy(PDViewDestination dest)
Deletes a view destination object. Before deleting a view destination, ensure that no link or bookmark refers to it.
|
||
PDViewDestination PDViewDestFromCosObj(CosObj obj)
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.
|
||
void PDViewDestGetAttr(PDViewDestination dest, ASInt32* pageNum, ASAtom* fitType, ASFixedRectP destRect, ASFixed* zoom)
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.
|
||
CosObj PDViewDestGetCosObj(PDViewDestination dest)
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.
|
||
ASBool PDViewDestIsValid(PDViewDestination dest)
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.
|
||
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.
|
PDViewDestNULL |
Product availability: All |
Platform availability: All |
#define PDViewDestNULL fixedNegativeInfinity
File: PDExpT.h |
Line: 3276 |
PDViewDestination |
Product availability: All |
Platform availability: All |
typedef OPAQUE_64_BITS PDViewDestination;
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.
See Also
File: PDExpT.h |
Line: 3271 |
PDViewDestCreate | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
PDViewDestination PDViewDestCreate(PDDoc doc, PDPage initialPage, ASAtom initialFitType, const ASFixedRectP initialRect, const ASFixed initialZoom, ASInt32 pageNumber)
Creates a new view destination object.
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 |
|
initialZoom — | The zoom factor to set for the destination. Used only if |
|
pageNumber — | Currently unused. |
The newly created view destination. |
See Also
Since
File: PDProcs.h |
Line: 4330 |
PDViewDestDestroy | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDViewDestDestroy(PDViewDestination dest)
Deletes a view destination object. Before deleting a view destination, ensure that no link or bookmark refers to it.
Parameters
dest — | IN/OUT The view destination to destroy. |
See Also
Since
File: PDProcs.h |
Line: 4342 |
PDViewDestFromCosObj | () |
Product availability: All |
Platform availability: All |
PDViewDestination PDViewDestFromCosObj(CosObj obj)
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.
Parameters
obj — | IN/OUT The dictionary Cos object to convert to a view destination. |
An array Cos object for the view destination. |
See Also
Exceptions
Since
File: PDProcs.h |
Line: 4412 |
PDViewDestGetAttr | () |
Product availability: All |
Platform availability: All |
void PDViewDestGetAttr(PDViewDestination dest, ASInt32* pageNum, ASAtom* fitType, ASFixedRectP destRect, ASFixed* zoom)
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.
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. |
See Also
Exceptions
Since
File: PDProcs.h |
Line: 4378 |
PDViewDestGetCosObj | () |
Product availability: All |
Platform availability: All |
CosObj PDViewDestGetCosObj(PDViewDestination dest)
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.
Parameters
dest — | IN/OUT The view destination whose Cos object is obtained. |
Array Cos object for the view destination. The contents of the array can be enumerated using CosObjEnum(). It returns a |
See Also
Since
File: PDProcs.h |
Line: 4396 |
PDViewDestIsValid | () |
Product availability: All |
Platform availability: All |
ASBool PDViewDestIsValid(PDViewDestination dest)
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.
Parameters
dest — | The view destination whose validity is determined. |
|
Since
File: PDProcs.h |
Line: 4354 |
PDViewDestResolve | () |
Product availability: All |
Platform availability: All |
PDViewDestination PDViewDestResolve(PDViewDestination dest, PDDoc doc)
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.
Parameters
dest — | IN/OUT The destination to resolve. |
|
doc — | IN/OUT The PDDoc that contains the destination. |
The resolved view destination. |
See Also
Since
File: PDProcs.h |
Line: 5678 |