Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).

New Forum | Previous | Next | (P-PDF) Developers

Topic: Re: How can we get bookmark index from current page?
Conf: (P-PDF) Developers, Msg: 57267
From: LeonardR
Date: 5/29/2002 05:24 PM

[copy of answer posted to another PDF list]

At 8:15 AM -0500 12/21/00, p-pdf-developer Listmanager wrote:
>I am developing a plug-in for acrobat reader.In the case, I want to
>get the relationship of bookmark and current page. After I read all
>SDK documents, there is no issue found for solving this problem.
>I think it may be solved by two approaches if they are possible.

There is no "easy" answer to this because there does not
necessarily have to be any relationship.

Bookmarks are simply a UI element (mostly) that have actions
attached to them - these actions can be (and in most cases are) "Go
To Page" actions, BUT they could just as easily be anything from
playing a movie to running a JavaScript.

>First: If I get an active PDDoc by function "AVDocGetPDDoc" and its page
>number, how can I get the corresponding bookmark index/ID?

You have to walk the bookmark tree, get each bookmark's
action, determine if the action is a GoTo, and if so, what page
number and then compare the page numbers.

>Second: If I get bookmark root by function "PDDocGetBookmarkRoot",
>how can I obtain corresponding pages and their child's pages?
Same thing - get the action (PDBookmarkGetAction), get the
type of action (PDActionGetSubtype) and see if it's GoTo. If it is,
then get the page number from the dictionary.

>Merry Xmas, API developer
Do keep in mind that people celebrate holidays OTHER THAN that one...

Leonard Rosenthol
Sr. Software Engineer (215) 922-3509 (voice)
Digital Applications (215) 440-0504 (fax)

PGP Fingerprint: 8CC9 8878 921E C627 0BC1 15BB FC19 64A9 0016 1397

PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Five visions of a PDF Day

In the world of PDFs or as we like to say Planet (of) PDF, a year isn't a real PDF year without an intense few days of industry knowledge sharing.

May 15, 2018
Platinum Sponsor

Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.


Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.