TOC Builder User Guide

Overview

TOC Builder generates a professional Table of Contents page (or pages) inside a PDF document by reading the existing bookmark hierarchy and rendering each bookmark as a formatted TOC entry with title, dot leaders, and page number. The plug-in can produce a TOC for a single document, regenerate one in many documents at once, or build a single master PDF whose TOC links to entries spread across several source files.

TOC Builder is designed to work alongside the Bookmarker component. Build a clean bookmark tree first, then use TOC Builder to render it as a presentable TOC.

Menu location

By default, TOC Builder commands appear directly under the Plug-Ins menu. If you prefer them grouped under a Plug-Ins > Mapsoft submenu, enable Place under Mapsoft menu in Plug-Ins > Mapsoft Preferences. Acrobat must be restarted for the change to take effect.

Video: TOC Builder User Guide shown step by step, with narration.
The TOC Builder dialog, Mapsoft TOCBuilder tab
The TOC Builder dialog, Mapsoft TOCBuilder tab.
The TOC Builder dialog, Header/Footer tab
The TOC Builder dialog, Header/Footer tab.
The TOC Builder dialog, Files tab
The TOC Builder dialog, Files tab.

Before you start

A few things to confirm before generating a TOC:

Quick start

The fastest path from a bookmarked PDF to a finished TOC:

  1. Open the PDF in Acrobat. Confirm the bookmark tree is correct.
  2. Choose Plug-Ins > TOC > TOC Builder... (or press Ctrl+Shift+1). The TOC Builder dialog opens on the Mapsoft TOCBuilder tab.
  3. Choose Blank Page in the TOC pages group (the simplest start). Set Based on Page to the page number you want the TOC to size itself to.
  4. In the Levels group, click Add Level for each bookmark depth you want to include (Level 1 for top-level bookmarks, Level 2 for their children, and so on). Configure font, size, indent, and leader style per level.
  5. In TOC Numbering Options, use Position and page to choose where the TOC is inserted, and Page after TOC is number for the number of the page that follows it.
  6. (Optional) Switch to the Header/Footer tab to add running headers/footers to the TOC pages.
  7. Click Apply. TOC Builder renders the TOC, inserts the new pages, and shows the result in the open document. Save the PDF to keep the changes.

Tip

Save your settings as a named configuration once they look right (see Saving and reusing configurations). The next document only needs you to load the configuration and click Apply.

The TOC Builder dialog

The dialog is a property sheet with three tabs across the top. Settings on every tab are committed together when you click Apply or Apply to File List at the bottom of the window. Switching tabs does not lose your inputs.

TabPurpose
Mapsoft TOCBuilderThe main TOC settings — how the TOC looks, where it goes in the document, and which bookmarks it includes.
Header / FooterOptional running header and footer text on the generated TOC pages, with independent settings for each.
FilesMulti-file processing — build the same TOC into many PDFs in one run, or generate a master TOC PDF that links across them.

Tab 1 — Mapsoft TOCBuilder

This is where most of the work happens. The tab is divided into eight groups; each group is documented below in the order it appears in the dialog.

TOC pages

Choose how the TOC pages themselves are created.

ControlDescription
Template File (radio)Use an existing PDF as the basis for the TOC pages. Useful when you have a designed cover/letterhead PDF and want the TOC rendered onto it. The template must be a different file from the document you are adding the TOC to — the dialog checks this (including network paths) when you apply. If the template is password-protected, an Enter Password prompt asks for its password when the TOC is built (batch runs do not ask).
Browse…Locate the template PDF on disk.
Blank Page (radio)Create plain TOC pages from scratch.
Based on PagePage whose size (media box) the blank TOC pages copy. Page rotation is not copied.

Units

The Units combo (top-right of the tab) controls the unit of measurement for every margin and position field on this tab — inches, centimetres or points. Switching units re-displays the existing values in the new unit; it does not reset them.

Page Margins

Margins applied to the TOC body content (excluding the title block).

ControlDescription
Later pages topDistance from the top of the second and later TOC pages to the first entry.
TopDistance from the top of the first TOC page (the one with the title) to the first entry. Make it larger than the title’s Top in Contents Title, by at least the entry font size, so the entries start below the title. When the title wraps, add 1.5 times the title size for each extra line.
Left / Right / BottomMargins of every TOC page. The TOC body is laid out within these margins. Each entry starts 25 pt (about 0.35 in or 9 mm) inside the Left margin, plus its level’s Indent, and the entries’ page numbers end 50 pt (about 0.7 in or 18 mm) inside the Right margin.

Contents Title

The heading that appears at the top of the TOC’s first page.

ControlDescription
TextThe title text itself (e.g. Table of Contents).
Insert (combo)Inserts a dynamic placeholder (such as the file name) into the title text at the cursor. With Apply to File List, the file name and path are those of each listed file or, for a master PDF, of the file the master is saved as.
FontFont family used for the title. Names in red are the 14 standard PDF fonts; the others are fonts installed on this computer. If saved settings name a font that this computer does not have (a configuration made on another computer, say), the font is kept, listed last, so the settings do not change when you save them; another font is used in its place when the TOC is built on this computer.
SizeTitle font size in points.
Top / LeftWhere the title sits: Top is the distance from the top of the page down to the title’s baseline, and Left the distance from the left edge of the page to the start of the title. They are positions, not margins, and are separate from the body margins above.
Right marginSpace kept clear between the title and the right edge of the page. A title too long for one line wraps onto as many lines as it needs, each starting at Left and 1.5 times the title size below the line before. Make the first page’s Top (under Page Margins) large enough to keep the entries below the title’s last line.
ColorTitle text colour. Click the swatch to open a colour picker.
Also add as bookmarkAdd a bookmark to the document that points to the TOC’s title page. Recommended — lets readers jump back to the TOC from anywhere.

Levels

The Levels list defines the formatting for each depth of bookmark you want rendered in the TOC. Level 1 is for top-level bookmarks, Level 2 for their immediate children, and so on. Bookmarks deeper than the deepest level you have defined are not rendered.

ControlDescription
Levels listTree showing the levels you have defined. Selecting a level shows its current settings in the panel to the right.
Add LevelAdd a new level. Opens the level editor, where you set font, size, colour, leader style, indent, and other per-level options.
Edit LevelEdit the selected level’s settings. Double-clicking a level in the list does the same thing.
Remove LevelDelete the selected level. If there are levels below it, you are asked first: they move up one place (Level 3 becomes Level 2, and so on), so the bookmarks the removed level formatted take the settings of the level below it, and the deepest bookmarks no longer appear in the TOC. Removing the deepest level leaves its own bookmarks out of the TOC, without asking.
Remove AllClear every level from the list. You will need to add at least one before you can generate a TOC.

Tip

The summary panel to the right of the list shows the selected level’s key settings at a glance: Content Color, Link Line Width (and Link Color, when a border is drawn), Font Name, Font Size, Line Spacing, Indent, Page Number Width, Wrap Width, Wrap Indent and Page Numbers, followed by Numbering and Leaders when page numbers are shown.

The level editor

Add Level and Edit Level open the level editor; its title bar shows which level you are editing (for example Edit Level 2). Indents and widths are in the units chosen in Units; font size and line spacing are in points.

ControlDescription
FontFont used for this level’s entries. Names in red are the 14 standard PDF fonts; the others are fonts installed on this computer. If the level names a font that this computer does not have (a configuration made on another computer, say), the font is kept, listed last, so clicking OK does not replace it; another font is used in its place when the TOC is built on this computer.
SizeFont size of this level’s entries, in points.
Line SpacingExtra space between lines at this level, in points, added to the font size (0 = no extra space).
IndentHow far this level’s entries are indented, in addition to the fixed 25 pt (about 0.35 in or 9 mm) inset every entry has from the left margin. A negative value moves the entries to the left.
Color (Font Attributes)Colour of the entry text. Click the swatch to open a colour picker.
Page num widthWidth kept for the page number at the end of each entry. Leave it blank for an automatic width.
Wrap widthLongest line an entry may use before it wraps or is truncated (see Long Bookmark Handling). Leave it blank to use the full width between the margins.
Include destination page numberingShow the number of the page each entry points to. The leader, numbering type and page-number width are used only while this is ticked.
Include Leaders (and the style list)Fill the space between the entry text and its page number with a leader: dashes, large or small dots (close or spaced), a solid line, or Full stops (text) (named Periods (text) where Windows is set to the United States, Canada or the Philippines). The first six are drawn as graphics, at a fixed size. The text style, last in the list and the default for a new level, is made of real full stop (period) characters in the level’s own font, size and colour: the dots grow and shrink with the font, line up from one entry to the next within a level, and are part of the page’s text, so a copied or searched entry reads Title ........ 7. The style list is available only while Include Leaders is ticked.
Numbering typeHow this level’s page numbers are written: 1, 2, 3; I, II, III; i, ii, iii; A, B, C; or a, b, c.
Line width (Links)Border drawn around each entry’s link area: None, Thin, Medium or Thick. None draws no border.
Color (Links)Colour of that border. Available only when Line width is not None.
Wrap indentHanging indent of the continuation lines of a wrapped entry. Leave it blank for an automatic indent of roughly twice the font size.
PreviewA sample line for each level up to the one you are editing, which is in full colour while the others are faded. When the lines do not all fit, the first levels are left out so that the level you are editing still shows.

TOC Numbering Options

Where the TOC sits in the document and how page numbering interacts with it.

ControlDescription
Page after TOC is numberThe number the TOC shows for the first page after the TOC; later pages count on from it. Where the TOC goes is set by Position and page. The default is 1, so the contents pages themselves are not counted: with the TOC at the front, each entry shows the number its page had before the contents pages were inserted. That number is lower than the page position Acrobat shows by the number of contents pages (with a one-page TOC, the page Acrobat calls 3 is listed as 2). The links in the TOC go to the right page either way. To list the positions Acrobat shows instead, enter the number of contents pages plus one (2 for a one-page TOC). Pages in front of the TOC are always listed by their position in the document.
Position (Before / After)Whether to insert the TOC before or after the page specified in page.
pageThe reference page for the position. Combined with the Position selector, this places the TOC at a specific location.
Restart page numberingNumber each entry’s page from the start of its chapter: every top-level bookmark starts a chapter whose first page is 1. While it (or chapter numbering) is ticked, Page after TOC is number is not used and is greyed.
Show chapter numbering starting atDisplay chapter numbers in the TOC entries beginning with the given value. Useful for documents organised by chapter.
Exclude bookmarks that don’t point to pagesSkip bookmarks whose action is not a Go-To-Page (e.g. JavaScript actions, named destinations without page anchors). Recommended for clean TOCs.
Create thumbnails for new pagesGenerate Acrobat page thumbnails for the new TOC pages so they show up in the Acrobat thumbnails panel.

Long Bookmark Handling

How TOC Builder copes with bookmark titles that don’t fit on one line.

ControlDescription
Wrap long bookmarks onto multiple linesLong entries flow onto a second (and third) line within the same TOC entry. Continuation lines are indented under the first line (a “hanging indent”) so the entry reads as one block, and the leader dots and page number stay on the last line. Default.
Truncate long bookmarks if they don’t fitCut the title at the available width. Enables the two truncation sub-options below.
Truncate at word boundaryWhen truncating, cut at the last whole word that fits, rather than mid-word.
Use ellipsis (…) at endAppend an ellipsis to truncated titles so readers know the title was shortened.

How far the continuation lines are indented is controlled per level by the Wrap indent field in the level editor (Levels > Edit Level > Wrapping). Enter the indent in the same units as the rest of the dialog (inches, centimetres or points); leave it blank to use an automatic indent of roughly twice the level’s font size. Because it is a per-level setting, deeper levels can use a smaller hanging indent than top-level entries if you prefer.

Configurations

See Saving and reusing configurations below — the same controls (Name, Save, Delete, Set as default) appear at the bottom of this tab and are shared across the whole dialog.

Tab 2 — Header / Footer

Optional running text printed on the TOC pages. Headers and footers are configured independently on the same tab — switch between them with the Header and Footer tabs at the top of the page. Each keeps its own settings.

Enabling header and footer

ControlDescription
Include header text on TOC pages / Include footer text on TOC pagesSwitch the selected section on. There is one check box; its label follows the Header or Footer tab, and each section is switched on separately.

A header or footer appears only when its section is switched on. The preview to the right of the Settings group shows only the sections that are switched on, so it stays blank until one is.

Settings

The Settings group applies to whichever side — header or footer — is currently selected with the Header / Footer tabs.

ControlDescription
UnitsUnits used for the position values on this tab.
Distance from top / Distance from bottomVertical distance from the top edge (header) or bottom edge (footer) to the text baseline.
HorizontalDistance from the left edge of the page (Left alignment) or the right edge (Right alignment) to the text, in the units chosen in Units. Not used with Center.
Alignment: Left / Center / RightPosition the text relative to the left, centre, or right of the page. Horizontal offsets are interpreted relative to this anchor.
SizePoint size used for the header/footer text.
ColorText colour. Click the swatch to open a colour picker.
FontFont used for the header/footer text. Names in red are the 14 standard PDF fonts; the others are fonts installed on this computer.
Base fontTreat the chosen font as one of the 14 standard PDF fonts, which are not embedded. Set automatically when you pick a font.
Bold / ItalicUse the bold or italic style of the chosen font.
Include page numberInsert the page number between the prefix and suffix text. Switch off for static text only (e.g. a copyright line). Page-number fields inserted with + are still printed.

Output (page-number format)

Controls the format of the page number when Include page number is ticked.

ControlDescription
Bates (000001, 000002, 000003)Zero-padded fixed-width Bates-style numbering, padded to the number of digits set in Digits (6 by default).
DigitsNumber of digits used for Bates numbering. The spin buttons step the value up and down.
Standard (1, 2, 3)Plain Arabic numerals, no padding.
Roman (I, II, III)Uppercase Roman numerals.
Roman (i, ii, iii)Lowercase Roman numerals.
PrefixText placed before the page number (e.g. Page - ). Used as the entire header/footer text if Include page number is off.
SuffixText placed after the page number.
+ (next to Prefix and Suffix)Insert a field at the end of the prefix or suffix: the page number (also in Roman or Bates form), the total page count, the date, the date and time, or the file name. The file name field prints the name, with its extension, of the PDF that receives the table of contents (the preview shows document.pdf in its place). With Apply to File List it prints each listed file’s own name, also when Acrobat Protected Mode has TOC Builder work on a temporary copy of the file, and for a master PDF the name the master is saved as.

First page and divider line

These settings also apply to the section selected with the Header / Footer tabs.

ControlDescription
Skip on first TOC pageLeave the header or footer off the first page of the table of contents.
Divider lineDraw a line between the header or footer and the page content.
ThicknessThickness of the divider line, from 0.1 to 10 points. Available only when Divider line is ticked.

Preview & Reset

ControlDescription
PreviewLive preview of the placement and formatting of the header and footer on a TOC page. A section that is switched off is not shown.
Reset Header to Defaults / Reset Footer to DefaultsRestore the default settings of the selected section only. The defaults switch the section off, so tick its Include box again to use it. The other section and the other tabs are not affected.

Tab 3 — Files

Process many PDFs at once: either add a TOC into each one independently, or generate a single master PDF whose entries link to bookmarks in the source files.

Files to process

ControlDescription
File listThe PDFs that will receive table-of-contents processing. Three columns are shown: File Name, Bookmarks (count), and File Path. A ? in the Bookmarks column means the file could not be opened.
Refresh BookmarksCount the bookmarks in every listed PDF again. A ? means the file could not be opened.
Remove Files Without BookmarksRemove from the list the PDFs whose Bookmarks count is 0. The files themselves are not changed, and files that could not be opened are kept and listed in a message.
HelpOpen this part of the user guide.
Add File…Add one PDF to the list (open-file dialog). To add several at once, use Add Folder… or drag PDFs onto the list.
DeleteRemove the selected files from the list. The files themselves are not deleted.
Delete AllClear the entire list.
Save List…Save the current list of PDFs to a text file. Useful for re-running the same job later.
Load List…Load a previously-saved list of PDFs from disk.
Add Folder…Add every PDF in a chosen folder. Subfolders are not searched, and PDFs already on the list are skipped.
Move Up / Move DownMove the selected files up or down in the list. Order matters for master mode — entries are added in list order.

The Move Up, Move Down, Delete, and Delete All commands are also available on the file list's right-click menu, and files can be reordered by dragging them within the list.

Table of Contents Output

ControlDescription
Generate table of contents in each fileFor every PDF in the list, render the TOC inline using the settings on Tab 1, then save the file in place. You are asked to confirm first, with the number of files that will be changed. A file that is open in Acrobat is skipped (so its unsaved edits are not saved for you) and listed in the summary; use Apply on it instead.
Create master PDF table of contentsBuild a single new PDF whose bookmark tree links to every bookmark in every source file. Source PDFs are not modified.
Master PDF outputFile path for the generated master PDF. It starts empty; if it is still empty when you click Apply to File List, you are asked where to save the master PDF.
Browse…Choose where the master TOC PDF will be saved.

Warning

Generate table of contents in each file overwrites the source PDFs. Make a backup of any production files before running this on a long list.

Files with no bookmarks

PDFs that contain no bookmarks are skipped (a warning lists them). In master mode they contribute no entries; in per-file mode no TOC is generated for them.

Settings are checked once

The settings are checked once before the run starts. Problems with individual files (a file that cannot be opened, a “Based on page” the file does not have, and so on) do not stop the run: each is listed against its file in the summary at the end. A file already on the list is not added a second time.

Acrobat Protected Mode

With Protected Mode on, Acrobat does not let a plug-in open files you did not pick in its own dialog, such as the PDFs in a folder you added. TOC Builder works on a temporary copy of each listed file, made by the Mapsoft broker that is installed with it, and copies the result back. If the broker is missing or out of date, the summary says that Protected Mode blocked access to the file.

The bottom buttons

The four buttons at the bottom of the dialog are visible from every tab.

ButtonWhat it does
HelpOpens this user guide in your browser.
ApplyValidate every tab and apply the TOC to the currently open PDF only. Settings from the Files tab are ignored.
Apply to File ListValidate every tab and apply to the PDFs on the Files tab. Behaviour depends on the Table of Contents Output radio: either each file gets its own TOC, or a single master PDF is generated. The rows selected on the Files tab are processed; when none is selected, every listed file is. Files without bookmarks are skipped, and the summary counts the files processed.
CloseClose the dialog. Unsaved changes to configurations are discarded; the active TOC settings persist for the next session.

Apply vs. Apply to File List

The two Apply buttons are easy to confuse. Use this rule of thumb:

Saving and reusing configurations

The Configurations group at the bottom of the Mapsoft TOCBuilder tab lets you save the current settings (across all three tabs) as a named configuration and reload it later. This is the single most effective time-saver for repeat work.

ControlDescription
Name (combo)The list of saved configurations. Pick one to load it; type a new name to save the current settings under that name.
SaveSave the current settings as a configuration with the chosen name. If the name already exists, you are asked before it is overwritten. A name can use any characters except a backslash (\).
DeleteDelete the selected configuration.
Set as defaultMark the selected configuration as the one that loads automatically the next time the dialog opens.

Configurations are saved in the registry for your Windows user account.

Troubleshooting

ProblemSolution
Missing entries in the TOCConfirm you have a level defined for the bookmark depth at which the missing entries sit. Bookmarks deeper than the deepest level you have configured are not rendered.
Bookmarks pointing to JavaScript actions appear in the TOCTick Exclude bookmarks that don’t point to pages in TOC Numbering Options.
Page numbers in the TOC look wrongCheck Page after TOC is number (and Restart page numbering / Show chapter numbering starting at) in TOC Numbering Options, and each level’s Numbering type. TOC Builder counts the pages itself and does not read Acrobat’s page labels.
TOC pages spill across too many pagesReduce the number of levels, lower font sizes, or increase the page size. The level summary panel shows the wrap width currently in use.
Long bookmark titles look uglySwitch from Wrap to Truncate in Long Bookmark Handling, with Truncate at word boundary and Use ellipsis ticked.
Header or footer not appearingOn the Header/Footer tab, pick the Header or Footer tab and confirm that Include header text on TOC pages or Include footer text on TOC pages is ticked. The preview stays blank for a section that is switched off. If only the first TOC page lacks it, untick Skip on first TOC page.
Apply to File List did nothingThe Files tab list is empty, or every file in the list has zero bookmarks. Use Add File… or Add Folder… to populate the list, then re-run.
Source files were modified unexpectedlyGenerate table of contents in each file writes back to the original PDFs. Use Create master PDF table of contents instead if you want the source files left alone.

Tip — iterate quickly

On a representative document, save a configuration once you have settings that look right. From then on, run TOC Builder with that configuration loaded, click Apply, and review — far faster than reconfiguring each level by hand for every job.

See also