×

Warning

JUser: :_load: Unable to load user with ID: 45
Print
Category: JS Acrobat
Also available:  Français (FR) 
Hits: 6736

bookmarks for each page creates bookmarks for every page of the PDF document.

 

Use

  1. Copy the code below
  2. Menu Advanced options > Document processing > Batch processing
  3. Click on New sequence to make a new batch
  4. Give the batch a name and validate.
  5. Click on Select commands and choose Execute javascript in the list
  6. In the options, choose "Run commands on open documents in Acrobat"
  7. Click on Add and double click on the line "Execute javascript" on the right.
  8. In the popping window, paste the code below
  9. Click ok to close the window
  10. With an open document, launch the script via the same menu and choose Run sequence after selecting your action.

This script generates bookmarks for every pages in the PDF.

/* Create bookmarks for each page in the document */
var root = this.bookmarkRoot;
try {
for (var i = 0; i < this.numPages; i++)
       {
       root.createChild("Page " + (i+1), "this.pageNum=" + i, i);
       }
} 
catch(e)
{
app.alert("Processing error: "+e)
}

2 thoughts on “Bookmarks for every pages”

  1. good

  2. Can I adapt this to create a bookmark for every page in my document based on a list of bookmark names?

    Cheers

Leave your comment

In reply to Some User