Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using Visual Basic to access Bookmarks

78 views
Skip to first unread message

Steve_...@adobeforums.com

unread,
Sep 30, 2003, 5:45:24 PM9/30/03
to
I've searched the postings and find many references to this problem (most 1-2 years old), but no real solutions. So here goes:

Each week I receive a pdf file, created by a service bureau, that contains images of documents they printed and mailed out for us. They have indexed the documents by customer number and date. Each week we get a new pdf file, with documents. I need to be able to extract/export/read the bookmarks from the new pdf and write them out to a SQL database. The hope is that when a customer service rep wants to see a document for customer A, they can query the SQL database for a list of bookmarks, spanning multiple pdf files, and select the document they wish to view.

I am using Acrobat 5.0, (not just the reader) and have downloaded the SDK.

Any tips / suggestions are very welcome.
Thank you,
Steve

Roland...@adobeforums.com

unread,
Oct 1, 2003, 7:46:02 AM10/1/03
to
Hallo Steve,

I have had the same problem and I used SDK and C++ in the following way:

create a plug-in with SDK, containing following steps to extract bookmarks from current document:
- find root bookmark (PDDocGetBookmarkRoot(...))
- find all "children" of current bookmark (PDBookmarkGetFirstChild(...), loop using PDBookmarkGetNext(...))
- extract bookmark title (PDBookmarkGetTitle(...)) and destination page (PDBookmarkGetAction(...), ..., PDViewDestGetAttr(...))
- write all informations in a txt-file (same name, other extension as pdf) or in a direct way to sql database
- if your file contains a "bookmark tree" (a child bookmark contains additional children), you should analyse the tree in a recursiv function

to analyse a lot of pdf files:
- create a DDE message handler to "call" the plug-in from an external programm

from external program (you can use VB, C++):
- open one pdf via DDE
- call plug-in extract function via DDE
- analyse created txt-file -> SQL database
- close pdf via DDE
- next pdf ...

I don't know, which special informations (title, page) from a bookmark do you need.
Do you have an example on a http page?

Roland Michel

0 new messages