Copy link to clipboard
Copied
I find myself recieving rather large documents without tables of contents, bookmarks, or page numbers for individual documents. After accessing the documents and creating bookmarks for each individual document, I would like to generate a report that includes the Bookmark and the Page Number for the Bookmark.
I have noticed several different codes online that may help in accomplishing this. However, they appear to be for older version of Adobe and/or have a syntax error.
Any help is appreciated. I cannot justify an additional $1,000 to $5,000 a year just to export bookmark information.
Copy link to clipboard
Copied
What scripts have you found?
Copy link to clipboard
Copied
Those listed at the link below:
https://acrobatusers.com/forum/javascript/exporting-bookmarks-page-numbers/
Copy link to clipboard
Copied
The correct scripts will work in Adobe Acrobat DC.
Copy link to clipboard
Copied
Which one is the correct one?
Copy link to clipboard
Copied
The script of Dimitri works.
Copy link to clipboard
Copied
I wrote that 🙂 But the download at the Acrobat User's Actions exchange (which I also wrote) is better.
Copy link to clipboard
Copied
I've developed a couple of (paid-for) tools that allow you to do that. See:
http://try67.blogspot.com/2008/11/acrobat-export-bookmarks-to-pdf-txt.html
http://try67.blogspot.com/2011/03/acrobat-create-toc-from-bookmarks.html
They are all for a one-time fee, and under $100.
Copy link to clipboard
Copied
You'll find a free bookmark report Action here:
https://acrobatusers.com/actions-exchange/
Copy link to clipboard
Copied
Hi Thom, May I know how to extract page numbers of all the bookmarks?
Copy link to clipboard
Copied
Why yes, of course. Download the scripts at either of the provided links and then exmine the code.
Copy link to clipboard
Copied
Hi Thom, I tried to download and able to use it. However, page numbers are not showing when I run the create bookmark report.
Copy link to clipboard
Copied
That script was for Acrobat 9 or 10. It may need some updating. But it also works best when all the bookmarks goto pages in the same document, and don't do any non-navigation actions. Are any errors listed in the Console Window?
I'll check it out later and see if anything needs to be fixed.
Copy link to clipboard
Copied
Hi Thom, I'm currently using Adobe Acrobat Pro. There is no error message. It can successfully list all the bookmarks but no page number data.
Copy link to clipboard
Copied
I checked the code for the bookmark report action and it does not collect the page numbers for the bookmarks. It only lists the names and hierarchies.
You could add this feature to the script, by executing each bookmark twice. Once after the page number is set to the first page, and once after the page number is set to the last page. Since there is no way for JavaScript to read the actual action performed by the bookmark, the only way to know if it navigates to a page in the PDF is to test it. If the page number never changes, then you know it's not a bookmark that navigates to a page.