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

Action Wizard Java Script that I have used for many years stopped working - "Not Responding"

Community Beginner ,
Mar 22, 2024 Mar 22, 2024

Copy link to clipboard

Copied

I have used khconsulting's “Extract PDF Pages Based on Content” Action Wizard java script for several years.  I modified the script to repeat 45 times because I extract 45 different sort codes.  When it was working, the process took approximately 15 minutes to complete. The last time the Action Wizard worked was February 2, 2024. When I attempted to use the Action Wizard on March 1, it froze with the message “Not Responding”. My Acrobat Pro version is 2023.008.20470 64-bit. I have googled and searched the Adobe forums, with no working solution. A word copy of my Action Wizard javascript is attached, along with a pdf file to apply it against. Any assistance you can provide will be appreciated.

 

TOPICS
Crash or freeze , JavaScript

Views

527

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 ,
Mar 22, 2024 Mar 22, 2024

Copy link to clipboard

Copied

So is Acrobat locking up?  If not, then what is the exact failure?

What debug have you done? For example, did you cut the script down to just one code section?  

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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 Beginner ,
Mar 22, 2024 Mar 22, 2024

Copy link to clipboard

Copied

Thank you for your reply.  The action creates one file and hangs "not responding".  Yes, I tested the script with just one code section, and it still hangs "not responding".  Tried running from java console, but the console hangs "not responding".  No issues using this for many years.  Then this happened March 1 (I run the action wizard once per month).  I use this same action on a smaller file; same thing, but it created 3 files and then hangs "not responding".

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 Beginner ,
Mar 22, 2024 Mar 22, 2024

Copy link to clipboard

Copied

Thom, I have to leave the office for today.  Is it possible for you to provide me with your direct contact information so that I can follow up with you on Monday, March 25?

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 ,
Mar 22, 2024 Mar 22, 2024

Copy link to clipboard

Copied

That is good information.  You should try running just the inner loop on a page and see what happens. 

Loops like this would only fail with a "not responding" if they never stopped. There's nothing obvious in the code that would do that. 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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 Beginner ,
Mar 26, 2024 Mar 26, 2024

Copy link to clipboard

Copied

Requesting the moderator remove the attachments.  I am the original author. Thank you.

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 ,
Mar 26, 2024 Mar 26, 2024

Copy link to clipboard

Copied

I ran one of the loops in the script on your test document and it took a very long time to finish, but it did finish. I just think Acrobat has gotten slower. You should do some optimization on your script to make it faster, it contains a lot of redundant code. 

For example, each loop re-searches exactly the same page text, so a more efficient solution would be to write only one loop, and check all words in that one loop. Also, create variables for anything that is acquired dynamically, so that it is only acquired once. Such as the number of words on each page. 

 

You might also consider using a different type of search that goes faster, such as the redaction tool. Don't redact, just use the placement of the redact annots to collect the page numbers, then close the doc without saving.

 

 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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 Beginner ,
Mar 27, 2024 Mar 27, 2024

Copy link to clipboard

Copied

LATEST

Thank you so much, Thom.  I will follow your recommendations.

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