Skip to main content
bobg19232400
Participating Frequently
July 9, 2019
Answered

Creating Bookmarks with the same name as Page automatically.

  • July 9, 2019
  • 3 replies
  • 6929 views

Hello,

I am looking to create bookmarks that are the same name as the page. I want to do this because I need to split the document up afterwords and want each file to have the same name as the page. All my pages are named correctly, I just need to create the bookmarks that have the same name as the page so when I spilit them they will have the same name as the page.  I have 200+ pages per document so any automation would be helpful.

Thank you!

This topic has been closed for replies.
Correct answer try67

So you want to add a bookmark for each page in the file, pointing to that page and with the same name as the page?

The page's name is probably just "1", by the way, not "1 of 100".


You can use this code to do it:

this.bookmarkRoot.remove();

for (var i=0; i<this.numPages; i++) {

    this.bookmarkRoot.createChild({cName: this.getPageLabel(i), nIndex: i, cExpr: "this.pageNum = " + i});

}

3 replies

star693
Participant
October 12, 2020

For any others that wish to accomplish this task: you can do it the manual way.

 

  1. Split the document on a page level.
  2. Download a bulk rename utility.
  3. Rename all of the files with the utility (usually a text file import with the current file name, this character (|), and the new name for every file.  For example: 'Pages from Document Name (2)|Learning the Alphabet', 'Pages from Document Name (3)|The First Step', 'Pages from Document Name (3)|The Second Step'.  This is easy using a copy file name utility and Excel's TEXTJOIN or CONCATENATE functions)
  4.  Combine all of the files into one PDF with the 'Always add bookmarks to Adobe PDF' selected.

 

Doing it this way is hardly elegant, but it doesn't take too long, and it works.

 

Another way is to use a trial version of bookmark utility/add-on.

Inspiring
July 9, 2019

Hi Bobg

I understand your situation, as per your description above, you want to create bookmarks for the pages of your document.

I hope this will fix the issue for you, keep us posted with the result.

Regards,

Amal

bobg19232400
Participating Frequently
July 9, 2019

Yes I am creating bookmarks the problem is that when I create the bookmark it says untitled. I was just wondering if there is a way to create a bookmark that is the same name as the page name instead of untitled. As of right now I am just going to the page creating the bookmark then renaming it. I just need a quicker way since I have 200+ page documents.  At the end I just want to extract the documents as individuals with file name as the as the page name. Also I am using Adobe Acrobat Pro.

try67
Community Expert
Community Expert
July 9, 2019

When you say "page name", what do you mean, exactly?

bobg19232400
Participating Frequently
July 9, 2019

Its the name that is the box left of the (1 of 100) and to the right of the the page up and down buttons. I need that name to be the name of the bookmark and ultimately the name of the document after I split it. 

try67
Community Expert
Community Expert
July 9, 2019

So you want to add a bookmark for each page in the file, pointing to that page and with the same name as the page?

The page's name is probably just "1", by the way, not "1 of 100".