Reducing the Size of Multiple PDF Files
- Introduction
- The tutorial shows how to reduce the size of multiple PDF files using the Action Wizard tool provided by Adobe® Acrobat® Pro.
- Reducing the size of PDFs improves their performance - particularly when they're being opened on the web without altering their appearance. The Reduce File Size command resamples and recompresses images, removes embedded Base-14 fonts, and subset-embeds fonts that were left embedded. It also compresses document structure and cleans up elements such as invalid bookmarks. Note that if the file size is already as small as possible, this command has no effect. The Action Wizard tool can be used to apply "Reduce File Size" command to multiple PDF files at once without the need to open indivudual files and manually using the menus. The tutorial is also using the AutoBatch™ plug-in to launch processing from outside of Adobe® Acrobat®.
- The tutorial provides the step-by-step instructions for:
- Creating Action Wizard "action" that reduce file size of all PDF files from a folder.
- Creating a batch file (*.bat) for starting the "action" from outside of the Adobe® Acrobat®.
- Executing the PDF file size reducing 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 - Add the "Reduce File Size" Command
- Expand the "Document Processing" category to see the available commands.
- Double click a command "Reduce File Size" to add it to the list of action steps:
- Step 4 - Uncheck the "Prompt User" Box
- Uncheck the "Prompt User" option box.
- Step 5 - Expand the "Save & Export" Category
- Expand the "Save & Export" category to see available commands.
- Step 6 - Add the "Save" Command to the Action Steps
- Double click a command "Save" to add it to the list of action steps.
- Step 7 - 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 8 - 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 processed. Click "OK" once done.
- Step 9 - Save the Action
- The action is now configured. We have specified both input and output folders and the file optimization 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 "Reduce PDF File Size" in the tutorial. Click "Save" to save the action.
- The action can be now executed by manually starting it from the Action Wizard's actions list. No further steps are necessary, unless the action needs to be executed from outside of the Adobe® Acrobat®.
- Step 10 - Create Batch File (*.bat)
- 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 have selected the "Reduce PDF File Size" 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 11 - Save Batch File (*.bat)
- Click the "Create Batch File..." button to auto-generate a batch file.
- Specify a folder and a file name for the batch file. We have named the file as "AutoBatch Reduce PDF File Size.bat" in the tutorial. Click "Save" to save the action.
- Click "Close" to close the "Create Command-Line Batch File" dialog.
- Step 12 - Close the Adobe® Acrobat®
- Use "File > Exit" menu to close the Adobe® Acrobat® application.
- Step 13 - Run the Batch File
- Now open the folder where "AutoBatch Reduce PDF File Size.bat" file is located and double click on it to execute.
- The batch file will apply Reduce File Size operation to all input files (as configured in the action). Note that it could take a significant amount of time to process multiple PDF files.
- The processing will reduce the size of multiple PDF files (where possible) and save them into the output folder as specified in the Action Wizard "action".
- 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_Reduce_PDF_File_Size.BAT "c:\pdf\June\"
CALL AutoBatch_Reduce_PDF_File_Size.BAT "c:\pdf\July\"
CALL AutoBatch_Reduce_PDF_File_Size.BAT "c:\pdf\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_Reduce_PDF_File_Size.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_Reduce_PDF_File_Size.BAT "c:\data\pdfs\" "c:\data\reduced\"
- 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\reduced\" folder.
- Click here for a list of all step-by-step tutorials available.