Using a Control File to Merge All PDFs in a Folder into Single Document
AutoSplit plug-in for Adobe® Acrobat®
- Introduction
- In this tutorial, we will look at how to merge all PDF files within a folder, into one or more PDF documents using a special control file. The goal is to take multiple folders that contain PDF documents, merge all files within them, and place the output merged files in a different folder location.
- Doing this manually for the contents of one folder at a time can be a slow process. AutoSplit™ offers a way to quickly execute this procedure on the contents on multiple folders at once. This method uses a control file - a plain text file that contains instructions for the plug-in to locate the desired folders, combine all files within them, and place the output in a specific folder location.
- Use any plain text editor (such as Notepad) to create a control file. Alternatively, it can be configured using a template format (see step 2 below). There is no limit for the number of output files that can be merged using this method. This operation is also available as a batch command as part of Acrobat's "Action Wizard" tool.
- Prerequisites
- You need a copy of Adobe® Acrobat® along with the AutoSplit™ plug-in installed on your computer in order to use this tutorial. Both are available as trial versions.
Step-by-Step Tutorial
- Step 1 - Open the Tool
- Open Adobe® Acrobat® and select “Plug-ins > Merge Documents > Merge Multiple Documents Using Control File...” from the main menu to open the "Merge Multiple Documents Using Control File" dialog.
- [⚡ How to locate Plugins menu ⚡].
- Step 2 - Create a New Control File
- Press "New Control File..." to create a control file using the template provided.
- Use this dialog to configure the control file. The control file is a collection of keywords (used to define processing options) and file names. The minimum requirements for the control file are: instructions for the input folder(s), an output folder, and a list of all documents to be merged to create at least one output PDF file. After listing one output folder (2nd line below), it is only necessary to list new input folders and the names of files to be merged on the following lines:
-
inputfolder=input folder file path for 1st output file
outputfolder=output folder file path for ALL output files
file names of files to merge>1st output file name
inputfolder=input folder file path for 2nd output file
file names of files to merge>2nd output file name
inputfolder=input folder file path for 3rd output file
file names of files to merge>3rd output file name
- Using the example shown below, the plug-in will merge all PDF files in folders Files1/Files2/Files3 by using a "*.pdf" wildcard, into files named “File1.pdf”, “File2.pdf”, and “File3.pdf”. All three output files will be placed into "c:\data\OutputFiles".
-
inputfolder=c:\data\Files1
outputfolder=c:\data\output
*.pdf,>First.pdf
inputfolder=c:\data\Files2
*.pdf,>Second.pdf
inputfolder=c:\data\Files3
*.pdf,>Third.pdf
- Enter all necessary input/output parameters using the template provided.
- Press the "Control File Help..." button in the bottom left corner of the dialog for further details about the available keywords that can be included in the control file.
- Press "OK" to proceed.
- Step 3 - Save the Control File
- You will now be prompted to save the new control file. Choose a suitable folder and optionally name the file before pressing "Save". The default filename is "Merge Control File". It will be saved with a *.mergefile extension.
- Step 4 - Run the Procedure
- The selected control file will now be visible in the preview box. Press "OK" to execute the procedure.
- A progress bar opens while processing files:
- A report box then displays the number of output files. Press "OK" to close it and open a HTML processing report.
- The processing report will be opened in the default web browser. It displays details of all output files, and the input files that were merged together to create them.
- Step 5 - Inspect the Results
- Open the output folder specified within the control file (c:\data\OutputFiles). All merged files have been placed here - open one to check it.
- All PDF's from the "Files1" folder have been merged together. Bookmarks for each file have been auto-added to simplify document navigation:
- Control File Syntax
- Please see the following tutorial for details on control file syntax.
- Click here for a list of all step-by-step tutorials available.