Defining Bookmark Actions; Creating A Pdviewdestination Object - Adobe ACROBAT SDK 8.1 Manual

Developing plug-ins and applications
Table of Contents

Advertisement

Adobe Acrobat SDK
Developing Plug-ins and Applications

Defining bookmark actions

After you create a new bookmark, you must define an action that occurs when a user clicks on the
bookmark. Otherwise, nothing occurs when a user clicks on the bookmark.
To create an action for a bookmark, you must create a
occurs when a user clicks on a bookmark. Once you create a
bookmark. For information, see
As specified earlier in this chapter, a typical bookmark action is to move to another location in the current
document. To illustrate how to create a bookmark action, this section defines a bookmark action that
displays a specific page in a PDF document when a user clicks the bookmark.
To define a bookmark action that generates a specific view of a PDF document, you create a
object by invoking the
the user to the specified destination view and requires the following arguments:
A
PDDoc
A
PDViewDestination
see
"Creating a PDViewDestination object" on page
A
PDDoc
the first parameter.
The
PDActionNewFromDest

Creating a PDViewDestination object

You must create a
To create a
following arguments:
An
AVPageView
information about creating this object, see
An
ASAtom
A
PDDoc
The
AVPageViewToViewDest
specifies the fit type values that you pass to the
argument.
Value
XYZ
Fit
FitH
FitV
FitR
FitB
"Assigning an action to a bookmark" on page
PDActionNewFromDest
that represents the PDF document for which the action is created.
object that represents a specific view in the PDF document. For information,
that represents the destination document. This object is the same object that is specified as
method returns a
PDViewDestination
PDViewDestination
object that represents the page view from which the destination is created. For
object that specifies the fit type of the view destination (see the table that follows this list).
object that represents the PDF document for which the view is established.
method returns a
Description
Destination specified as upper-left corner point and a zoom factor.
Fits the page into the window, corresponding to the Acrobat viewer's FitPage menu item.
Fits the width of the page into the window, corresponding to the Acrobat viewer's Fit Width
menu item.
Fits the height of the page into a window.
Fits the rectangle specified by its upper-left and lower-right corner points into the window.
Fits the rectangle containing all visible elements on the page (known as the bounding box) into
the window (corresponds to the Acrobat viewer's Fit Visible menu item).
PDAction
method. This method creates a new action that directs
115.
PDAction
object in order to invoke the
object, invoke the
AVPageViewToViewDest
"Creating a AVPageView object" on page
PDViewDestination
AVPageViewToViewDest
Working with Bookmarks
Defining bookmark actions
object that represents the action that
object, you can assign it to a
PDAction
116.
method.
PDActionNewFromDest
method and pass the
object. The following table
method as the second
115
PDAction
method.
116.

Advertisement

Table of Contents
loading

Table of Contents