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
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