Skip to main content
This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Karl Heinz  Kremer
Community Expert
Community Expert
Jul 26, 2017 3:13 PM UTC

Take a look here: Counting Bookmarks - KHKonsulting LLC

Translate
Bernd Alheit
Community Expert
Community Expert
Jul 26, 2017 2:41 PM UTC

With Acrobat JavaScript you can access the bookmarks.

Translate
JM4787Author
Participant
Jul 26, 2017 2:47 PM UTC

Thank you. I have loaded the JS for creating a bookmark report which I can then count the entries, but was more interested in being able to count the hundreds of bookmarks in my pdf first. I do not know how to write JS for that and it is not an automatic option in the Actions List.

Translate
try67
Community Expert
Community Expert
Jul 26, 2017 3:14 PM UTC

This code should do the trick:

function CountBookmarks(bkm) {

   if (bkm.children != null)

        for (var i = 0; i < bkm.children.length; i++) {

            counter++;

            CountBookmarks(bkm.children);

        }

}

var counter = 0;

CountBookmarks(this.bookmarkRoot);

console.println("Number of bookmarks in this file: "+counter);

Translate