Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Extract Bookmark and Page Numbers

New Here ,
May 28, 2020 May 28, 2020

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.

TOPICS
Acrobat SDK and JavaScript, Edit and convert PDFs, How to

Views

1.3K

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
community guidelines
Adobe Community Professional ,
May 28, 2020 May 28, 2020

Copy link to clipboard

Copied

What scripts have you found?

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
community guidelines
New Here ,
May 28, 2020 May 28, 2020

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
community guidelines
Adobe Community Professional ,
May 28, 2020 May 28, 2020

Copy link to clipboard

Copied

The correct scripts will work in Adobe Acrobat DC.

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
community guidelines
New Here ,
May 28, 2020 May 28, 2020

Copy link to clipboard

Copied

Which one is the correct one?

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
community guidelines
Adobe Community Professional ,
May 29, 2020 May 29, 2020

Copy link to clipboard

Copied

The script of Dimitri works.

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
community guidelines
Adobe Community Professional ,
May 29, 2020 May 29, 2020

Copy link to clipboard

Copied

I wrote that 🙂  But the download at the Acrobat User's Actions exchange (which I also wrote) is better. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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
community guidelines
Adobe Community Professional ,
May 28, 2020 May 28, 2020

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.

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
community guidelines
Adobe Community Professional ,
May 28, 2020 May 28, 2020

Copy link to clipboard

Copied

You'll find a free bookmark report Action here:

https://acrobatusers.com/actions-exchange/

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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
community guidelines
New Here ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

Hi Thom, May I know how to extract page numbers of all 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
community guidelines
Adobe Community Professional ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

Why yes, of course.  Download the scripts at either of the provided links and then exmine the code. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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
community guidelines
New Here ,
Aug 05, 2021 Aug 05, 2021

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. 

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
community guidelines
Adobe Community Professional ,
Aug 06, 2021 Aug 06, 2021

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. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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
community guidelines
New Here ,
Aug 06, 2021 Aug 06, 2021

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. 

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
community guidelines
Adobe Community Professional ,
Aug 09, 2021 Aug 09, 2021

Copy link to clipboard

Copied

LATEST

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. 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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