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

Why is app.activeDocs still giving warning when only one pdf open

Explorer ,
Jun 14, 2017 Jun 14, 2017

Copy link to clipboard

Copied

Hi,

So have the following code in the javascript of an action wizard.  I was just notified that a user is still getting this error even though they only have the one pdf open from which they initiate the action wizard.  It should not give them this error but it is.  Can someone tell me why that would be?  Note I already verified they only have this one pdf open.

var d = app.activeDocs;

if (d.length > 1)

{

  1. app.alert("This application will not run unless ONLY the 1st pdf file in the batch labeling sequence is open.   Please close all additional pdf's and re-execute the Batch Labeling Application from the Action Wizard.");
  2. event.rc  = false;

}

They are using Adobe Acrobat XI Pro.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

389

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 14, 2017 Jun 14, 2017

Copy link to clipboard

Copied

You put this code in an Action? Then of course it will show the alert... You have the the original file open, and then the files you're processing using the Action. Also, Acrobat sometimes doesn't close the files it is processing correctly and the last one usually remains open at the end of the Action.

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
Explorer ,
Jun 14, 2017 Jun 14, 2017

Copy link to clipboard

Copied

It works fine for me.  I make sure no pdf's are open.  Then I double click on the 1st desired pdf in my sequence.  Then I go to Tools>Action Wizard>Batch Labeling App and run.  I get no errors.

For some reason, this user is saying they get errors even though they are making sure no pdf's are open except this initial one from which they launch the action wizard.

Does this change your answer?

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
Explorer ,
Jun 14, 2017 Jun 14, 2017

Copy link to clipboard

Copied

LATEST

Note the additional files in the action are hidden.  They never open.  This is why I never get an error.  The idea was to only give user this error if they had multiple pdf's open, then tried to run the action from one of them.  I knew this would be bad news so wanted an error for this case. I even tested this with the code by creating this scenario (multiple pdf's open)  and was very happy the error came up.

What is puzzling is that this error is coming up for this user even though only 1 pdf open.  This makes no sense.

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