Highlighted

bookmark java script

New Here ,
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

71

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

bookmark java script

New Here ,
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

72

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
Most Valuable Participant ,
Mar 28, 2019

Copy link to clipboard

Copied

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

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
Reply
Loading...
Resources
Trending Issue & Solution
Edit PDF in Adobe Acrobat Pro DC