Counting bookmarks in Acrobat DC?

New Here ,
Jul 26, 2017

Copy link to clipboard

Copied

Is there a JS available or another method for counting bookmarks in Acrobat DC?

TOPICS
Acrobat SDK and JavaScript, Windows

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Counting bookmarks in Acrobat DC?

New Here ,
Jul 26, 2017

Copy link to clipboard

Copied

Is there a JS available or another method for counting bookmarks in Acrobat DC?

TOPICS
Acrobat SDK and JavaScript, Windows

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 26, 2017 0
Adobe Community Professional ,
Jul 26, 2017

Copy link to clipboard

Copied

With Acrobat JavaScript you can access the bookmarks.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 26, 2017 0
New Here ,
Jul 26, 2017

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 26, 2017 1
try67 LATEST
Most Valuable Participant ,
Jul 26, 2017

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 26, 2017 1
Adobe Community Professional ,
Jul 26, 2017

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 26, 2017 1