• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

bookmark java script

New Here ,
Mar 28, 2019 Mar 28, 2019

Copy link to clipboard

Copied

below is code written to bookmark odd number page i.e 1,3,5 like wise

and want to pickup string start with "VR NO " and next 10 character for each odd number page and use as bookmark

//https://forums.adobe.com/thread/1094081

/* Create Bookmarks */

//

// Bookmarks every OTHER page of this document from a defined Array.

//

// Define the Array named aBookmarks.

aBookmarks = new Array("VR NO ");

// Book every SECOND page from the above array.

var root = this.bookmarkRoot;

// i = Consecutive order of the array.

// n = Total number of pages.

// p = Consecutive order of the pages being bookmarked.

var n = this.numPages;

try {

    for (var i = 0; i < n; i){

    for (var p = 0; p < n; p){

{

    root.createChild(aBookmarks, "this.pageNum=" + p, p)

    var i = i + 2; // change here page number like 1 for single 2 for double

    var p = p + 2; // change here page number like 1 for single 2 for double

}}}}

// Notify user of possible errors.

catch(e)

{

app.alert("Processing error: "+e)

}  

Views

306

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
LEGEND ,
Mar 28, 2019 Mar 28, 2019

Copy link to clipboard

Copied

LATEST

What is your question, please? I notice you posted in the Acrobat Reader forum, Reader cannot add bookmarks in any way.

Votes

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