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

javascript to open specific page in other pdf doc

Participant ,
Jun 20, 2019 Jun 20, 2019

Copy link to clipboard

Copied

Heya everybody. I was playing around with one of my old docs and it uses the otherDoc javascript. Everything still works fine, but what I would like to add (to the button which opens the other doc), is to have the other doc opens but also opens to a specific page. I can't figure it out. Can someone help out with the javascript to make it work. This is a sample bit of script I'm using to open and transfer info from one doc to the other.

  case "WSPro":

        var myDoc = this ;

var otherDoc=app.openDoc("WSPro.pdf",this);

try {

otherDoc.getField("daName").value = myDoc.getField("daName").value

} catch(e) {}

etc, etc.

break;

I want, when WSPro.pdf opens that it will open to page 5 when I select it from myDoc. But, will open to page 1 when opens when opening the WSPro.pdf directly.

Thank you all for your time and help through the years.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

711

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 2 Correct answers

Community Expert , Jun 20, 2019 Jun 20, 2019

Add this:

otherDoc.pageNum = 4;

Votes

Translate

Translate
Community Expert , Jun 20, 2019 Jun 20, 2019

otherDoc.pageNum = 4;

Votes

Translate

Translate
Community Expert ,
Jun 20, 2019 Jun 20, 2019

Copy link to clipboard

Copied

Add this:

otherDoc.pageNum = 4;

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
Participant ,
Jun 21, 2019 Jun 21, 2019

Copy link to clipboard

Copied

Thanks again, it's exactly what I wanted to do.

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
Community Expert ,
Jun 20, 2019 Jun 20, 2019

Copy link to clipboard

Copied

otherDoc.pageNum = 4;

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
Participant ,
Jun 21, 2019 Jun 21, 2019

Copy link to clipboard

Copied

LATEST

Thank you too, Bernd. You're correct as well.

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