Skip to main content
Inspiring
July 5, 2018
Question

How do you loop an action in Acrobat 11 Pro

  • July 5, 2018
  • 2 replies
  • 7848 views

Hi,

I have an action which prints a batch of pdf files. It is important that the files are printed in a particular sequence. This all works fine. However I now want to print multiple copies of the entire batch keeping the same sequence per batch.

I have tried editing the .sequ file by copying the entire batch several times. However, the additional batches are just ignored. It seems the action recognises that it has already printed the file and does not repeat it for duplicates (Scenario A).

I have found a workaround solution to this by creating multiple copies of the same folder with the same files. Now when I edit the .sequ file by copying the entire batch several times but referring to the different folders, there is no problem (Scenario B).

Examples:

Scenario A - This will only print one copy of Doc 1, Doc 2 and Doc 3 in sequence:

          <Sources>

                    <File path="/C/Folder/Doc 1.pdf"/>

                    <File path="/C/Folder/Doc 2.pdf"/>

                    <File path="/C/Folder/Doc 3.pdf"/>

                    <File path="/C/Folder/Doc 1.pdf"/>

                    <File path="/C/Folder/Doc 2.pdf"/>

                    <File path="/C/Folder/Doc 3.pdf"/>

                    <File path="/C/Folder/Doc 1.pdf"/>

                    <File path="/C/Folder/Doc 2.pdf"/>

                    <File path="/C/Folder/Doc 3.pdf"/>

                    </Sources>

          <Group label="Untitled">

                    <Command name="Print" pauseBefore="false" promptUser="false"/>

          </Group>

Scenario B - This will print three copies of Doc 1, Doc 2 and Doc 3 in sequence:

          <Sources>

                    <File path="/C/Folder/Doc 1.pdf"/>

                    <File path="/C/Folder/Doc 2.pdf"/>

                    <File path="/C/Folder/Doc 3.pdf"/>

                    <File path="/C/Folder - Copy (1)/Doc 1.pdf"/>

                    <File path="/C/Folder - Copy (1)/Doc 2.pdf"/>

                    <File path="/C/Folder - Copy (1)/Doc 3.pdf"/>

                    <File path="/C/Folder - Copy (2)/Doc 1.pdf"/>

                    <File path="/C/Folder - Copy (2)/Doc 2.pdf"/>

                    <File path="/C/Folder - Copy (2)/Doc 3.pdf"/>

                    </Sources>

          <Group label="Untitled">

                    <Command name="Print" pauseBefore="false" promptUser="false"/>

          </Group>

My question is:

Is there an easier way to do Scenario B? Is it possible to just loop Scenario A the number times required? If so, how?

Any help would be appreciated. Thanks!

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
July 8, 2018

If the file-paths are fixed and known in advance then this can be done with a script, where you would hard-code the paths of the files and then print them in order, how many times you'd like.

Inspiring
July 8, 2018

Thanks for your reply.

Yes the file-paths are fixed. Can you please give me an idea of how to go about writing a script to do this. I have never written a script in Acrobat. I'm more familiar with writing macros in Word and Excel. If you could give me something to start off with that would be great.

try67
Community Expert
Community Expert
July 10, 2018

Also, once the script is finalized, can I save it as a file and execute the file, or must I always copy it into the console?


You can save it to a .js file and install it as a folder-level script, or as an Action file (.sequ).

Legend
July 5, 2018

You could consider combining the files to print into one, then the order of printing becomes unimportant. Everything MIGHT get simpler.

Inspiring
July 5, 2018

Sorry, I should have added that each document is stapled separately when printed. So I can't just combine the documents into one.