Using Action Wizard to Create a Table of Contents for Multiple Documents
Introduction
This tutorial demonstrates how to automatically create a hyperlinked 'Table of Contents' (TOC) for multiple PDF documents at once. The hierarchical table of contents is created from existing PDF bookmarks, and is either inserted as a new page into the corresponding file, or saved as a separate PDF document. The plug-in also offers detailed settings used to modify the visual appearance of the table of contents entries, and flexible page numbering options.
This example uses AutoBookmark™ to create a simple TOC for each document using default settings. For more detail on how to customise TOC creation, click here.
The method below uses the Action Wizard tool (known as "Batch Processing" in earlier Acrobat versions) with the AutoBookmark™ plug-in to automate this procedure. It allows you to create a series of PDF processing commands (called "actions") with user-specific settings. "Actions" can be executed on multiple files at once, or on the contents of an entire folder. Once an action is created, it can be executed either manually from the Adobe® Acrobat® Pro toolbar, or from a command-line batch file using the AutoBatch™ plug-in.
Use "Action Wizard" to pre-configure the automatic TOC creation settings, that can then be executed with a single-click.
Prerequisites
You need a copy of Adobe® Acrobat® Pro along with the AutoBookmark™ plug-in installed on your computer in order to use this tutorial. Both are available as trial versions.
Step 1 - Open Action Wizard
Start Adobe® Acrobat® and open the "Tools" panel located on the main Acrobat toolbar.
Scroll down and click on the "Action Wizard" tool icon.
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 "TOC from Bookmarks" Command to the Action Steps
Click on the "More Tools" category to expand the list of available commands.
Find and double-click on the "TOC from Bookmarks" command - or select it and press the "+->" button to add it to the list of action steps on the right.
Step 4 - Open the TOC Settings
The "TOC from Bookmarks" command will appear in the "Action steps to show:" list. Uncheck the "Prompt User" checkbox, otherwise the program would always prompt for the user to modify settings when this action is executed. Then press the "Specify Settings" button to open the "Table of Contents Settings" dialog.
Step 5 - Edit the TOC Settings
The standard "Table of Contents Settings" dialog of the AutoBookmark™ plug-in will now be open. Specify all required TOC settings here.
Optionally use the "Load Settings" button to load a pre-saved configuration. A 'Table of Contents Settings File' can be saved in *.toc format via the "Save Settings..." button.
Proceed through different tabs in the settings bar. For example, use 'General' to select whether the TOC should be inserted as a new page into the PDF (default), or saved as a separate document.
Optionally add leaders to TOC elements under the "Page Numbering" tab. Use the drop-down list to select a leader style.
Press "OK" to use the current settings.
Step 6 - Add a Save Command
Now add a "Save" command to save the processed file(s) in a specific location. This enables the action to proceed through each TOC creation and save the previous file, without prompting the user to manually save each one.
To do this, expand the "Save & Export" category and double-click the "Save" command, or select it and press the "+->" button to add it to the list of action steps.
Step 7 - Optional: Modify New Filenames
Press "Specify Settings..." to configure the saving options.
In the "Output Options" dialog, specify filenaming options and processing parameters ("Embed Index" or "PDF Optimizer"). In this example, we will add additional text to the end of output filenames ("_TOC").
Press "OK" to save these settings.
Step 8 - Select an Output Location
Using this action, the existing files can be modified or the user can specify an alternative location for the output files to be saved in. To do this, press the "Save" symbol to open the save type menu.
Use this menu to select the saving method. Use "Save to Local Folder" to specify a location for the modified files to be saved in.
This opens a dialog that can be used to select a suitable output location. Manually re-size this window if necessary. Select the desired folder, then press "OK".
Step 9 - Save the Action
Press "Save" to save the action.
Now type a suitable "Action Name" and optionally a description into the "Save Action" dialog. Once this is done, press "Save..
Step 10 - Execute the Action
The new action will have been added to the "Actions List" on the right. Click on it to use it.
Now press the "Add Files..." button to select the files that are to have a TOC generated via these pre-configured settings.
Select the necessary files in the document finder dialog that opens. Note that files from different folders can be processed at the same time, via the repeated use of the "Add Files..." button.
Any input files will be listed under "Files to be processed:". Press the "Start" button to begin running the action.
Step 11 - Check the Results
It may take some time to process many files. It's recommended to process smaller quantities of files wherever possible. Once the software has successfully generated the TOC, the document (or last input document if processing multiple files) will be automatically opened in Acrobat. Inspect the table of contents that has been created from the input PDF's bookmarks. Each bookmark/contents entry will be hyperlinked to the corresponding page in the document.
The image below shows a sample TOC created for one of the input documents used in this example.
If an output location was chosen (see step 8), open the folder to check that any renaming options have worked correctly. In this example, the new filenames now contain the "_TOC" text.
You can find a list of other step-by-step bookmarking tutorials here: http://www.evermap.com/abm_bm_summary.asp#tutorials.