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.

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. Run Plug-Ins > TOC Builder. The TOCBuilder 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, set Page after TOC is and the Position & page values to control where the TOC is inserted.
  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 TOCBuilder 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 seven 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.
Browse…Locate the template PDF on disk.
Blank Page (radio)Create plain TOC pages from scratch.
Based on PagePage number to copy size and orientation from. The blank TOC pages match this page’s dimensions.

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, millimetres, 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
First page topTop margin used only on the first TOC page — useful when the title sits higher than subsequent page tops.
Top / Right / Left / BottomMargins for all TOC pages after the first. The TOC body is laid out within these margins.

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.
FontFont family used for the title.
SizeTitle font size in points.
Top / Right / LeftMargins specifically for the title block (separate from the body margins above).
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 dialog 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. Bookmarks that would have rendered at that depth will not appear in the TOC.
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 active level’s key settings at a glance — content colour, links colour, font name and size, line spacing, indent, page-number field width, and wrap width.

TOC Numbering Options

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

ControlDescription
Page after TOC isThe page number that should immediately follow the inserted TOC. Used to compute where to insert the TOC pages.
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 numberingRestart the document’s page numbering at 1 (or the chapter offset, if set) starting at the page after the TOC.
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. Page numbers 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.

Configurations

See Saving and reusing configurations below — the same controls (Name, Save, Remove, 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 every TOC page. Headers and footers are configured independently on the same tab — toggle between them with the Edit radio buttons.

Enabling header and footer

ControlDescription
Include header textInclude header text on the pages created for the table of contents.
Include footer textInclude footer text on the pages created for the table of contents.

At least one must be ticked for any header/footer to appear. The preview to the right of the Settings group reads “Footer text disabled” (or similar) until the relevant box is ticked.

Settings

The Settings group applies to whichever side — header or footer — is currently selected via the Edit radio buttons.

ControlDescription
Edit: Footer / HeaderSwitch which side the rest of the Settings panel is editing. Each side keeps its own values.
UnitsUnits used for the position values on this tab.
Distance from edgeVertical distance from the top edge (header) or bottom edge (footer) to the text baseline.
HorizontalHorizontal offset for positioning the header/footer text.
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.
Include page numberInsert the page number between the prefix and suffix text. Switch off for static text only (e.g. a copyright line).

Output (page-number format)

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

ControlDescription
Bates (Standard) (0001, 0002, 0003)Zero-padded fixed-width Bates-style numbering.
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.

Preview & Reset

ControlDescription
PreviewLive preview of placement and formatting for whichever side (header or footer) is currently selected.
Reset to DefaultsRestore the default header and footer settings on this tab. Does not affect the other tabs.

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.
Add File…Add one or more PDFs to the list (open-file dialog).
DeleteRemove the selected PDF from the list.
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 found in a chosen folder.
Move Up / Move DownReorder the selected PDF in the list. Order matters for master mode — entries are added in list order.

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. The active document, if it is in the list, is processed last.
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. Defaults to %LOCALAPPDATA%\TOCBuilder\master_toc.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.

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. If no rows are selected on the Files tab, every row is 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, it is overwritten.
RemoveDelete the selected configuration.
Set as defaultMark the selected configuration as the one that loads automatically the next time the dialog opens.

Configurations are stored in TOCBuilder.ini (under your user profile or the installed plug-ins folder, depending on your Configuration storage preference in Mapsoft Preferences > General). Sections are named TOCBuilderOptionsSet_<ConfigName>.

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 wrongOpen Acrobat’s Page Thumbnails > Number Pages… dialog and verify the document’s page labels. TOC Builder uses whatever Acrobat reports.
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 appearingConfirm Include header text or Include footer text is ticked. The preview area shows “disabled” when the relevant tickbox is off.
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