This is a tricky one. If you knew the file names and folder ahead of time you could do this with an automation script.
But a more general solution would be to use a script in an Action. An Action script is run each time a new file is loaded into the Action. The script doesn't know if it's the first or the last file so the first thing it needs to do is look for an already open merge file, if this file does not exist it creates a new one page PDF. If the merge PDF does exist, then it inserts the new file into the merge PDF. As well as creating the Merge PDF, the script would also need to collect information from the user about the target file names. And there is an ordering issue. The files are not loaded into the Action in any predicable order. So if ordering is needed, there has to be some way to sort the files for inserting.
1 person found this helpful
Thom gave you an outline of how to do this within Acrobat. As you can see, it’s not straight forward. For cases like this, I prefer an approach that uses both Actobat to do the heavy PDF lifting and an application outside of Acrobat that handles the interaction with the user, reading of directories, and sorting filenames. You can e.g. program in VB or VBA (especially if you want to process information that comes from a spreadsheet) to do all file system operatione, and then use Acrobat’s IAC Interface to process the merging of PDF files.
Karl and Thom, thank you so much for your guidance. Good place to start.
The interaction part is less of a worry. I thought there would be a script that would be able to handle the file merge for related names.
Thom, I have the file names and folder names. Is there a quicker approach per your first paragraph.
Yes, if you know the name and location of the files you can write a short script to loop through the names and insert the files into a merged file.
var oMergeDoc = new Doc();
oMergeDoc.insertPages(oMergeDoc.numPages-1, <Path to File>);
Thank you, Thom! I appreciate your help a great deal!