These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Bookmarks in a scanned document

aboggs
Registered: Mar 12 2007
Posts: 4

Is there a way to create a PDF file from the scanner that will automatically bookmark every page with a page number?

My Product Information:
Acrobat Standard 7.0.9, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This would be an option on the software that does the scan conversion. If it's Acrobat then no. But it's easy enough to write a JavaScript that adds a bookmark to each page.

Read the bit in the Acrobat JavaScript Reference about bookmarks, but the best way to create a bookmark is to use the
"NewBookmark" menu item like this

for (var i=0;i

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Ok, the code didnt' come through
Let's try again.


for (var i=0;i

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Didn't work. hmm

Ok, the code didnt' come through
Let's try again.


for (var i=0; i (less than)this.numpages;i++){this.pageNum = i;app.execMenuItem("NewBookmark");}

This is a privileged script so you should run it from the console window. To name the bookmarks you'll need some more code
for(i=0;i (less than) this.bookmarkRoot.children.length;i++){this.bookmarkRoot.children (i in square brackets) .execute();this.bookmarkRoot.children (i in square brackets).name = "Page " + this.pageNum;}

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script