Create Table of Contents for PDF Documents

AutoBookmark plug-in for Adobe® Acrobat®

Overview
The AutoBookmark™ software provides functionality for automatic generation of hyperlinked table of contents for PDF documents. The hierarchical table of contents (TOC) is created from existing PDF bookmarks by inserting new pages into corresponding PDF document or saving it as a separate PDF document. The software provides fine control over visual appearance of the table of contents entries and flexible page numbering options. The functionality provides a convenient way of creating new or updating existing table of contents for PDF documents. The software can automatically find and delete any previously generated TOC and re-build table of content pages again from the current set of bookmarks.
Functionality
Table of contents generation (TOC) is available in the following modes:
  1. Generating TOC for a single PDF document and inserting it into document itself.
  2. Generating TOC for a single PDF document and saving it as a separate PDF document.
  3. Generating Master TOC for multiple PDF documents and saving it as a separate PDF document.
  4. Visual Page Index provides an alternative way to add a visual table of contents to PDF documents. Use it to generate page index with hyperlinked thumbnail images of PDF pages.
TOC for a Single PDF Document
The table of contents is generated from the document's bookmarks and is automatically hyperlinked:
Example of TOC generated for a single PDF document
Master Table of Contents for Multiple PDF Documents
The "master" table of contents (TOC) is generated based on bookmarks from multiple PDF documents and is hyperlinked to point to original PDF files:
Example of Master TOC generated for multiple PDF documents
File Headers in Master Table of Contents
Each "section" in master table of contents (TOC) comes from a separate PDF file and contains table of contents entries created from bookmark titles (if any are present). Optionally, each section can have a header. Here is an example of the file header that uses auto-incrementing file index, file name, number of pages and "Title" document metadata.
Customizable Master TOC file headers
File headers can be customized with any combination of text and document/file metadata:
  • Input file name with extension
  • Number of pages in the document
  • Auto-incrementing file index
  • Number of bookmarks in the document
  • Bates number for the first page
  • Bates number for the last page
  • "Title" document metadata field
  • "Subject" document metadata field
  • "Author" document metadata field
  • "Keywords" document metadata field
  • Any standard or custom document metadata field
Master TOC for Documents without Bookmarks
It is possible to generate master TOC document with just file headers in case if input PDF documents do not contain any bookmarks. Here is an example of master TOC that is using auto-incrementing file index, file name and Bates numbers in the file header:
Master TOC with file index, file name and Bates numbers in the file headers
Internal and External Table of Contents
The software can generate both internal and external table of contents. Internal TOC is inserted into a specified location within the document itself (typically somewhere at the beginning of the document). External TOC is saved as a separate PDF document and each TOC entry is linked back to the main document(s).
Internal PDF table of contents External PDF table of contents
Visual Appearance
The software provides selection of separate text styles to use for generating various parts of table of contents. Choose separate font, text size and color for the TOC title and 4 levels of the headings. Both line spacing and level offset can be customized. Optionally, text color for each entry can be inherited from the corresponding bookmark.
Different table of content visual styles
Customizing TOC Title
The document metadata properties (such as document “Title” or “Author”) can be used within the title text. For more complex customizations, use Acrobat JavaScript scripting method to change both the content and the visual appearance of the title. The example below shows a 3-line title that is generated using document's metadata properties with each line using a different text style:
Customizing TOC title with metadata
Titles can be customized with any combination of text and document/file metadata:
  • Input file name with extension
  • Number of pages in the document
  • Auto-incrementing file index
  • Number of bookmarks in the document
  • Bates number for the first page
  • Bates number for the last page
  • "Title" document metadata field
  • "Subject" document metadata field
  • "Author" document metadata field
  • "Keywords" document metadata field
  • Any standard or custom document metadata field
Hyperlinks
Each TOC entry has the same hyperlink (PDF "action") as a corresponding bookmark. The hyperlink can be of any kind and point inside or outside of the current PDF document. The page numbers are displayed only for TOC entries created from bookmarks that point to a page in the current PDF document. TOC entries that do not point to a page will have no corresponding page number displayed.
The following example shows TOC entry link "action" (as displayed by Link Inspector tool):
Table of Contents From Text File
The AutoBookmark generates TOC from a current set of document's bookmarks. However, often the desired entries for the TOC are supplied in the form of the text file. It is easy to generate TOC from a text file by first importing bookmarks from text and then generating a table of contents. Alternatively, it is possible to use any of the automated bookmarking tools to build bookmarks prior to TOC generation. The following example shows a sample tab-delimited text file with bookmarks defined that can be used to generate TOC:
Account Overview   5
   Checking Account   6
   Saving Account   7
   IRA Account   9
Interest, Divident and Other Income   12
   High Yeild Savings   15
Page Dimensions and Margins
The software can either automatically select page size and orientation for TOC pages (based on the dimensions of the first page in the current PDF document) or use a user-specified page size. Page margins can be individually customized as well.
Bookmark Levels To Use
Select a range of bookmark levels for building a table of contents. Bookmarks without actions can be optionally skipped. This feature provides a way to exclude certain bookmark levels from TOC.
Page Numbering Options and Styles
The AutoBookmark™ software provides 4 different option for TOC page numbers.
Page Labels
The software can use custom page labels as displayed in the "Page Thumbnails" navigation panel and in the "current page number" box in Adobe Acrobat. Page labels can contain any kind of text, not only decimal numbers. Page labels are great way to use different page numbering schemes within one document.
Original Page Numbers 
Sequential page numbers (starting from 1) for PDF pages before the table of contents is inserted into the PDF document. Optionally, a user-specified page offset can be applied.
Named Destinations
If bookmarks are using named destinations to point to page views, then it is possible to use destinations as “page numbers” in the TOC text. This is a very flexible method that provides a way to use custom text for page labeling. It is especially useful, if it is necessary to use “logical” page numbers that are different from “physical” ones. Unlike all other methods that always provide only single “page reference” for each “physical” page in the PDF document, named destinations allow to use multiple different references to a single page. There can be any number of destinations for every page in the document
Bates Numbers (if available)
Bates numbers are special kind of identification numbers that can be added to PDF pages by "Add Bates Numbering" function in Adobe® Acrobat® . If there are no Bates numbers assigned to the pages, then the corresponding page number will be blank.
Leader Styles
There are multiple different styles available for displaying leaders:
Different styles for displaying page numbers in table of contents
Custom TOC Page Labeling
There are 5 different methods how TOC pages can be labeled. Page labels are shown in the "Page Thumbnails" navigation panel and in the "current page number" box in Adobe Acrobat. Page labels can contain any kind of text, not only decimal numbers. TOC pages use a separate from the rest of the document page labeling scheme, because TOC pages are automatically generated and potentially can be updated later.
  • Decimal numbers, such 1,2,3,4
  • Upper case Roman numerals, such as I, II, III, IV, V,..X
  • Lower case Roman numerals, such as i, ii, iii, iv,.. x
  • Upper case alphabetic labels, such as A, B, C, D,...
  • Lower case alphabetic labels, such as a, b, c, d,...
Optionally, a text prefix can be added before the auto-incrementing numbers. For example, TOC-1, TOC-2 and etc.
Labeling TOC pages
Insert Cover Pages
This option takes a user-selected PDF file and inserts all of its pages in front of the table of contents.
Add Custom Background
Add custom background of any complexity to every TOC page. Design a page in the separate PDF file to serve as a background and use it to customize visual appearance and behavior of the TOC pages. The first page from the “background” PDF will be placed behind the content of every generated TOC page. Use this functionality to add borders, navigational buttons or links, custom headers or footers.
Here is an example of the TOC with background PDF added. It adds some graphics and navigational toolbar.
Use of the background in the TOC pages
The following example shows how to use background PDF to add custom header and footer with company information:
Use of header and footer in the TOC pages
Another example shows use of colored background for a more informal document:
Use of colored background in the TOC pages
Advanced Scripting
Use custom Acrobat JavaScript code to customize TOC pages while getting fine control over PDF document properties. The Acrobat JavaScript is an extension to the commonly used JavaScript programming language that provides access to objects, properties and methods available in Adobe Acrobat.
Deleting TOC Pages
The software can automatically find existing TOC pages (generated by AutoBookmark) in the current PDF document and remove/replace them. This feature is convenient for rebuilding table of contents. This operation is also available as command in Action Wizard for batch processing.
Video Tutorial: Creating Table of Contents Using AutoBookmark
The video explains how to create table of contents from PDF bookmarks using AutoBookmark software.