Solved Open and close many PDF files inside a Loop

What am I currently doing:
I have a task where a series of PDF files need to be worked upon.
I am using a loop inside which using Navigate stage and Launch action open Adobe Acrobat and open my required file.
Then a do a series of tasks and then use Navigate stage and Terminate action to close the file.
Ask:
Instead of launching and terminating each time when the loop runs, I want to launch application once, then open PDF file and close PDF file.
Why this ask:
I believe, launching and terminating Adobe Acrobat many times has the chance of crashing the application on a bad day, ideal way is to keep the application running but only open and close only the files
Any advice is appreciated.
 

sivagelli

Well-Known Member
hello,

You may try to use File Menu to open and close pdf files instead of opening and closing the Adobe Reader.

So, here are the possible steps in the flow.
1. Launch the Acrobat Adobe
Loop start
2. Open the File thru File Menu Open
3. Perform the required steps on pdf file
4. Close the File using File Menu
Loop end
5. Terminate adobe reader


Note: If you are unable to spy the elements of adobe reader, please disable "Enable Protected Mode" in Preferences -> Sandbox Protections.

Please post back if with updates.
 

VJR

Well-Known Member
Hi El Guapo Sabelotodo,

You can use the Sendkeys equivalent for Ctrl + F4 to close the current file without closing the main application window.
Ctrl + W also works on my version (Adobe Acrobat DC).
 

VJR

Well-Known Member
There is, but Attach and Detach will simply Attach/Detach to the Acrobat Application and not directly to your individual document and in any case you need to close a file and open another to work with each of them.

You can also think of spying the outside border or the top portion of the Acrobat application window and use the Close action that shows up in the Navigate stage. This is like clicking the close button of the window but you will again have to open the Acrobat application each time. Whereas in the first option the main application window always remained open and you just had to close/reopen files. You can choose whichever option sounds feasible in your scenario.
 

CamiCat

Member
hello,

You may try to use File Menu to open and close pdf files instead of opening and closing the Adobe Reader.

So, here are the possible steps in the flow.
1. Launch the Acrobat Adobe
Loop start
2. Open the File thru File Menu Open
3. Perform the required steps on pdf file
4. Close the File using File Menu
Loop end
5. Terminate adobe reader


Note: If you are unable to spy the elements of adobe reader, please disable "Enable Protected Mode" in Preferences -> Sandbox Protections.

Please post back if with updates.
Hello @sivagelli , c
can you please share the screenshots for step 2. Open the File thru File Menu Open?
Thank you,
 

CamiCat

Member
Hi El Guapo Sabelotodo,

You can use the Sendkeys equivalent for Ctrl + F4 to close the current file without closing the main application window.
Ctrl + W also works on my version (Adobe Acrobat DC).
Hello @VJR ,
how can I spy the Menu Open in the application adobe Acrobat.
How can I do that?
Thank you
 

Attachments

  • adobe reader spy.png
    48.1 KB · Views: 24
Top