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

setting the active doc and adding page numbers

Explorer ,
Dec 13, 2018 Dec 13, 2018

Copy link to clipboard

Copied

var openDoc = app.openDoc({cPath: myPath});

var d = app.activeDocs; <--gets all open docs

app.alert("this.path: " + this.path);  <--this.path is not always the openDoc. 

app.alert("openDoc.path: " + openDoc.path);

How do I make the openDoc the active Doc?  Essentially I am needing to add page numbers to it.

TOPICS
Acrobat SDK and JavaScript

Views

76

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
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 13, 2018 Dec 13, 2018

You can try using the bringToFront method, but there's really no need to do it. Just use the openDoc variable instead of the "this" variable.

Likes

Translate

Translate
Community Expert ,
Dec 13, 2018 Dec 13, 2018

Copy link to clipboard

Copied

LATEST

You can try using the bringToFront method, but there's really no need to do it. Just use the openDoc variable instead of the "this" variable.

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
community guidelines