How do I display the bookmark name (text) in a header or footer of the corresponding page?

I want to display the bookmark name/text in the header or footer for it's corresponding page. Is there a way to run a script or something?

We have documents that have been assembled and each page is bookmarked. We'd like the bookmark text to display on the corresponding page so we can easily reference it when writing briefs. Any help would be appreciated.

Also, a free solution would be ideal. Thank you!


Drew Barker


3 Answers

Voted Best Answer

Free is nice for you, but not for the other guy who has to spend the time and effort on it.

This is a non-trivial script. The idea is to walk the bookmarks, navigating to each one. The script builds a filtered list of bookmarks vs pages in order to capture the highest level bookmark that navigates to a particular page. Since you can have more than one bookmark going to the same page. Then the script applies watermarks to each page to create the headers.

As it happens I created exactly this automation tool some time ago for www.pdfscripting.com, but it's not free.

Cheers,


By Thom Parker   

I agree with Thom. Creating such a script requires knowledge, experience and time.

I've also developed a (non-free) tool that does that. Have a look here, if you're interested:
http://try67.blogspot.com/2009/03/acr...


Gilad D (try67)   

I do enjoy helping people, which is why I (and Max, Gilad, the Georges, and everyone else) answer questions here. We help people with small items and learning the ropes. But we don't provide full custom solutions for free.
Now, if you have a simple bookmark structure, and you're not worried about hierarchy or multiple links to pages, then the loop just got simpler. You can find info on the Bookmark object and the doc.addWatermarkFromText function in the Acrobat JavaScript reference. These are the only two relevant Acrobat JavaScript elements you need to write a short automation script to perform this task. You can run the script from the console window. Find links to some of the details in my signature block below.

Thom Parker
The source for PDF Scripting Info pdfscripting.com

The Acrobat JavaScript Reference, Use it Early and Often

The most important JavaScript Development tool in Acrobat
The Console Window (Video tutorial)
The Console Window(article)

Having trouble, Why Doesn't my Script Work


Thom Parker   


Please specify a reason: