Batch Conversion of Files Into PDF Format
- Introduction
- The tutorial shows how to convert all files from a folder into PDF format using the Action Wizard tool provided by the Adobe® Acrobat® Pro. The tutorial shows how to launch conversion from outside of the Adobe® Acrobat® using AutoBatch plug-in.
- The tutorial provides the step-by-step instructions for:
- Creating an Action Wizard "action" for converting all files from an input folder into PDF format to an output folder.
- Creating a batch file (*.bat) for starting the conversion from outside of the Adobe® Acrobat®.
- Executing the file conversion job.
- Prerequisites
- You need a copy of the Adobe® Acrobat® Pro along with the AutoBatch™ plug-in installed on your computer in order to use this tutorial. You can download trial versions of both the Adobe® Acrobat® and the AutoBatch™ plug-in.
- Step 1 - Start the Action Wizard Tool
- Start the Adobe® Acrobat® Pro application. Select the "Tools" panel located on the main Adobe® Acrobat® toolbar. Double click on the "Action Wizard" tool icon to open the tool controls.
- Step 2 - Create a New "Action"
- Click on the "New Action" icon on the "Action Wizard" toolbar to create a new batch processing "action".
- Step 3 - Expand the "Save & Export" Category
- Expand the "Save & Export" category to see available commands.
- Step 4 - Add the "Save" Command to the Action Steps
- Double click a command "Save" or select it and press "+->" button to add it to the list of action steps.
- Step 5 - Specify an Output Folder
- Click the "OK" icon next to the "Save" command.
- Select "Save to Local Folder" from the pull-down list.
- Specify an output folder where to place the resulting files. The "Output Folder" is selected in the tutorial. Click "OK" once done.
- Step 6 - Specify the Conversion Settings
- Click "Specify Settings" below the "Save to Local Folder" action step.
- Select "Save File(s) As Adobe PDF" in the "Output Options" dialog. This command will convert files to PDF format as part of the file saving procedure. Click "OK" to finish.
- Step 7 - Specify a Folder to Process
- Click the "Add Folder" icon in the "Files to be Processed" section.
- Select a folder that contains files to be converted. Click "OK" once done.
- Step 8 - Save the Action
- The action is now configured. We have specified both input and output folders and the file format conversion settings. Click "Save" button to save the action.
- Type a desired "Action Name" and, optionally, enter a description into the "Action Description" box. We have named the action as "Convert multiple files into PDF" in the tutorial. Click "Save" to save the action.
- The action can be used now in the Action Wizard tool by manually starting it from the actions list. No further steps are necessary, unless the action needs to be executed from outside of the Adobe® Acrobat®.
- Step 9 - Specify Batch File (*.bat) Parameters
- The new action is now listed in the "Actions List" of the Action Wizard tool and can be started by double-clicking on it.
- Now we are going to create a command-line batch file (*.bat) that can be used to execute the action from outside of the Adobe® Acrobat®. This functionality requires the AutoBatch™ plug-in. The batch file is auto-generated based on the user-selected parameters.
- Select "Plug-Ins > Create Batch File..." from the Adobe® Acrobat® main menu to open the "Create Command-Line Batch File" dialog.
- Select the created action from the "Select Acrobat Action" list. We are using the "Convert multiple files into PDF" action in the tutorial.
- Select "Do nothing" from the "Select Final Action:" list unless input files need to be moved or copied after the processing.
- Optionally, check the "Create a Task-Scheduler Compatible batch file" option box to create a file that will execute silently without displaying any windows.
- Step 10 - Specify Processing File Types (Optionally)
- The processing file types could be restricted. The AutoBatch™ allows to limit the file types that would be converted to a specific group of file formats. Click "File Types..." to specify the processing file types.
- Check the "Process only the following file types" option. Type desired file extensions separated by comma into the text field. For example: csv, txt, docx.
- Click "OK" to save and exit the dialog.
- If the file types were restricted, then only defined file types would be processed. For example, we have typed "doc, docx" to convert only the Microsoft Word format files (*.doc, *.docx). Only files with *.doc and *.docx extensions would be converted into PDF files. All other files would be skipped:
- Step 11 - Create Batch File (*.bat)
- Click the "Create Batch File..." button to auto-generate a batch file.
- Select a folder where to save the output *.bat file. We have named the file as "AutoBatch Convert multiple files into PDF.bat" in the tutorial. Click "Save" to save the action.
- Click "Close" to exit the "Create Command-Line Batch File" dialog.
- Step 12 - Close the Adobe® Acrobat®
- Use "File > Exit" menu to close Adobe® Acrobat®.
- Step 13 - Run the Batch File
- Now open the folder where *.bat file is located and double-click on "AutoBatch Convert multiple files into PDF.bat" to execute.
- The batch file will be executed converting files from the input folder into PDF format and saving them into the output folder as specified in the Action Wizard "action".
- For each file in the input folder, there is going to be one *.pdf file in the output folder.
- Advanced: Using Different Input and Output Folders
- It's possible to override an input/output file or folder selection in "action" and pass a different file or a folder path. It allows using the same "action" with different input/output files and folders without editing the "action" itself. You can pass a custom input/output file or folder path as a batch file parameter (see example below). The alternative path is going to be used instead of input/output file or folder specified in the original "action". The alternative paths(s) can be passed either in the Windows Command-Prompt or as part of the another BAT file.
- Using another BAT file
- Use "CALL" statement to pass different parameters as part of another BAT file. Multiple jobs can be started from a single BAT file while passing different input/output folders. Use any plain text editor to create a BAT file with different input/output folders passed as the parameters:
-
CALL AutoBatch_Convert_PDF_into_Word.BAT "c:\pdf\June\" "c:\data\MsWord\June\"
CALL AutoBatch_Convert_PDF_into_Word.BAT "c:\pdf\July\" "c:\data\MsWord\July\"
CALL AutoBatch_Convert_PDF_into_Word.BAT "c:\pdf\August\" "c:\data\MsWord\August\"
- The BAT file can be executed by double-clicking on it in the Windows Explorer window.
- Using the Command-Prompt
- The following examples show how to pass alternative folder paths using the Command Prompt. Press Win+R on the keyboard to open the Run window. Type cmd or cmd.exe and press Enter. This will launch the Command window. Navigate to the folder where the BAT file is located and type the following commands.
-
[c:\] AutoBatch_Convert_PDF_into_Word.BAT "c:\data\pdfs\"
- The above command-line will process all files in "c:\data\pdfs" folder instead of "c:\Input Folder" folder that is specified in the original sequence description.
-
[c:\] AutoBatch_Convert_PDF_into_Word.BAT "c:\data\pdfs\" "c:\data\MsWord"
- The above command-line will process all files in "c:\data\pdfs" folder instead of "c:\Input Folder" folder that is specified in the original sequence description and output processed files into "c:\data\MsWord" folder.
- Click here for a list of all step-by-step tutorials available.