Customizing File Headers in Master Table of Contents

AutoBookmark™ plug-in for Adobe® Acrobat®

Master Table of Contents
Master table of contents (TOC) is a PDF document that contains table of contents with links to pages in other PDF documents. It is typically generated for a group of PDF files to provide a single table of contents for the collection of documents.
Here is an example of the master TOC for two PDF documents: Product Guide.pdf and Deployment and EULA.pdf. Each document comes with bookmarks that are used to generate table of contents.
Customizable Master TOC file headers
File Headers
Master TOC consists of one or more "sections". Each section comes from a separate PDF file and contains table of contents entries created from bookmark titles. It is also possible to use PDF files without bookmarks. Optionally, each section can have a header. By default, a header contains only a corresponding file name. However, it can be customized with any combination of text and following metadata fields:
  • Input file name with extension - use keyword {Filename}
  • Number of pages in the document - use keyword {NumPages}
  • File index (auto-incrementing number) - use keyword {index}
  • "Title" metadata field - use keyword {Title}
  • "Subject" metadata field - use keyword {Subject}
  • "Author" metadata field - use keyword {Author}
  • "Keywords" metadata field - use keyword {Keywords}
  • Bates number for the first page (if available) - use keyword {BatesStart}
  • Bates number for the last page (if available) - use keyword {BatesEnd}
  • Number of bookmarks in the document - use keyword {NumBookmarks}
It is possible to refer to metadata fields by enclosing field name with either <..> or {...} brackets. For example, use <filename> or {filename}. Important: The custom metadata field name must not contain any spaces. All metadata field references are case-sensitive and must match the corresponding metadata name. For example, you must use {Title}, not {title}. All other keywords are case insensitive (except {index} keyword that should be lower case). You can use either {NumPages} or {numpages}.
Document metadata fields can be accessed via "File > Properties" menu in Adobe Acrobat. They are located on “Description” tab.
Creating Master TOC
Start the Adobe® Acrobat® application and select "Plug-Ins > Table of Contents > Create Master TOC File for Multiple Documents…" to open the "Create Master TOC File for Multiple PDF Documents" Tool.
Locating menu in the new Acrobat interface:
Locating menu in the new Acrobat interface
Locating menu in the "classic" Acrobat interface:
Locating menu in the classic Acrobat interface
Start operation by selecting a menu
2. Press "Browse..." button to select name and folder location for the output PDF file (master TOC):
Open File Headers dialog
3. Press "File Headers..." button to open File Headers dialog. Once finishing configuring File Headers press OK button on the main screen to start generating a master TOC file.
Open File Headers dialog
Customizing File Headers
Use “File Headers” dialog to control appearance and content of the file headers. Type desired file header into the entry box. You can use metadata properties anywhere in the header text. For example, the following expression uses a filename and number of pages in the document as a file header:
{Filename} ({numpages} pages)
Enter file header expression
Here is the resulting master TOC generated using the above settings. {Filename} is replaced with file name of each document, {numpages} is replaced with actual number of pages:
Enter file header expression
Adding File Indexes
Use {index} keyword to insert a sequential auto-incrementing file index into a file header. For example, lets insert an index at the start of each file header by using a following expression:
{index}. {Filename} ({numpages} pages)
Enter file header expression
Enter file header expression
Using Document Metadata
Here is an example of using Title document metadata field in multiline header.
{index}. {Filename}
{Title}
Enter file header expression
Enter file header expression
Document metadata can be accessed via File > Properties menu in Adobe Acrobat (Description tab). Here is an example of using different metadata fields in file and TOC headers.
Customizing TOC title with metadata
Using Number of Bookmarks
Use {NumBookmarks} keyword to insert number of bookmarks into a file header:
{index}. {Filename} - {NumBookmarks} bookmarks
Enter file header expression
Enter file header expression
Using Bates Numbers
If input PDF file(s) has no bookmarks and option to generate a file header is turned on, then TOC will consist only with corresponding file headers. Here is an example of the master TOC for PDF files that do not have bookmarks but have Bates numbers assigned. This example is using the following expression to display a range of the Bates numbers for each PDF document:
{index}. {Filename} ({BatesStart}- {BatesEnd})
Example of the master TOC with Bates numbers
Selecting Text Style
The visual appearance of the TOC text is controlled by general TOC generation settings. Use "Edit TOC Generation Options..." button located on the main dialog to access all options that control TOC generation. File headers are using style settings for Level 1.
Adding Horizontal Line
Check “Add horizontal line after each file header” option to add a horizontal line separator below the file header.