Creating A Avpageview Object; Assigning An Action To A Bookmark; Example 9.2 - Adobe ACROBAT SDK 8.1 Manual

Developing plug-ins and applications
Table of Contents

Advertisement

Adobe Acrobat SDK
Developing Plug-ins and Applications
Value
FitBH
FitBV

Creating a AVPageView object

You must create an
AVPageViewToViewDest
AVDocGetPageView
page view is obtained and returns an
You can create an
AVDocFromPDDo
the
AVDocGetPageView
AVPageView myPageView = AVDocGetPageView(AVDocFromPDDoc(myPDDoc));
Once you create an
invoking the
that represents the page number:
ASInt32 pNum = 2;
AVPageViewGoTo(myPageView,pNum);

Assigning an action to a bookmark

After you create both an
PDAction
and passing the
The following code example creates a
by a
PDBookmark

Example 9.2

//Create a PDDoc object based on the current PDF document
AVDoc avDoc = AVAppGetActiveDoc();
AVPageView pageView = AVDocGetPageView(avDoc);
PDPageNumber pageNum = AVPageViewGetPageNum(pageView);
PDDoc myPDDoc = AVDocGetPDDoc(avDoc);
//Create a AVPageView object that represents the page view of a document
AVPageView myPageView = AVDocGetPageView(AVDocFromPDDoc(myPDDoc));
//Set the page view to the second page
ASInt32 pNum = 2;
AVPageViewGoTo(myPageView,pNum);
//Create an PDViewDestination object that is used to create a PDAction object
PDViewDestination pdvDes =
AVPageViewToViewDest(myPageView,ASAtomFromString("Fit"),myPDDoc);
//Create a PDAction object
Description
Fits the width of the bounding box into the window.
Fits the height of the bounding box into the window.
AVPageView
method. You can create an
method. This method requires an
object that is based on the
AVDoc
c method and passing the
method.
AVPageView
AVPageViewGoTo
AVPageView
object and assign it to a specific bookmark by invoking the
object and the
PDBookmark
object named

Assigning an action to a bookmark

object that represents the page view in order to invoke the
AVPageView
object.
AVPageView
PDDoc
object. You can invoke this method as an argument for
PDDoc
object, you can specify a specific PDF document page number by
method and passing the
object and an
PDViewDestination
PDAction
object and assigns it to a bookmark that is represented
PDAction
.
childBookmark
Defining bookmark actions
object by invoking the
that represents a PDF document whose
AVDoc
object that already exists by invoking the
object and an
AVPageView
object, you can create a
PDBookmarkSetAction
object as arguments.
Working with Bookmarks
116
object
ASInt32
method

Advertisement

Table of Contents
loading

Table of Contents