Mapsoft TOCBuilder

A Publishing Tool for use with Adobe Acrobat and Adobe Acrobat DC 
(Version X upwards)

Running under Windows TM Operating Systems

Issue 5
January 2023

Mapsoft Computer Services Limited owns this publication’s proprietary information, protected by copyright. Only with Mapsoft Computer Services Limited’s prior written consent, can anyone photocopy, reproduce, or translate any part of this publication. The publication’s information may change without notice. Mapsoft Computer Services Limited has made a considerable effort to ensure this manual’s accuracy and completeness, but does not assume responsibility or liability for any errors or inaccuracies that may appear.

Mapsoft Computer Services Limited shall not be liable for any direct, incidental or consequential damages of any nature, or losses or expenses resulting from the use of this material.

Adobe and Acrobat are trademarks of Adobe Systems Inc which may be registered in some jurisdictions.

Microsoft is a registered trademark and WindowsTMand Windows NTTM are trademarks of Microsoft Corporation.

Mapsoft is a registered trademark of Mapsoft Computer Services Limited

Other brand or product names are the trademarks or registered trademarks of their respective holders.

2002-2021 by MAPSOFT COMPUTER SERVICES LIMITED. All rights reserved in all countries.

15 Erme Court

Leonards Road

Ivybridge

Devon PL21 0SZ

United Kingdom   

+44 2032 900473
email: support@mapsoft.com

 

www.mapsoft.com

Table of Contents

Introduction

The TOCBuilder tool allows you to create a Table of Contents for a document. Each entry within the Table of Contents can show the appropriate page for that entry, (as in a traditional Table of Contents for a printed document). In addition, the Table of Contents links each entry directly to the corresponding actual heading within the document. Selecting that link from within the Table of Contents will cause the focus in the document to jump to the relevant text. The Table of Contents is thus a powerful tool for navigating around your document.

You can create a hierarchical Table of Contents, indenting sub-sections below higher-level sections, or flatten it with all entries at the same level. By using options in the TOCBuilder, you can control the positioning and appearance of all entries within a Table of Contents.

TOCBuilder uses bookmarks found within a document to generate the Table of Contents.

You cannot create a Table of Contents for a document that contains no bookmarks

TOCBuilder generates a Table of Contents using bookmarks. You can create these bookmarks directly within Acrobat or by using the Mapsoft BookMarker tool, available for purchase on the Mapsoft website at www.mapsoft.com. BookMarker generates a list of bookmarks from the document’s headings. Typically, authors organize most large documents by chapters, sections, and sub-sections. Using these different heading levels, BookMarker creates a hierarchical set of bookmarks.

If the original bookmarks within a document are hierarchical, then the resulting Table of Contents will be hierarchical too. In a hierarchy subordinate items are indented to the right. Each different heading level within the Table of Contents will correspond to one of the hierarchical levels within the bookmark list. Thus, TOCBuilder will create a level 1 Table of Contents entry for each level 1 bookmark found within the document. It will create a level 2 Table of Contents entry for each level 2 bookmark and so on. Options you specify to the TOCBuilder tool control the appearance and positioning of each different heading level within the generated Table of Contents.

The depth at which you can nest the Table of Contents depends on how deeply you nest the bookmarks. For instance, if you nest bookmarks to four levels, you can create up to four levels of entries in a Table of Contents.

The following diagram shows a sample Table of Contents created using the TOCBuilder tool. This particular example displays a hierarchical Table of Contents nested to three levels.

Table of Contents Levels

If you place all the bookmarks at the same level, you will flatten the resulting Table of Contents, making all entries within it appear at the same level. The following diagram illustrates this.

table of contents on one level

This diagram shows the same Table of Contents as in the first diagram, but here the Contents list has a flat structure as the original bookmarks were all at the same level, while the first example has a hierarchical structure reflecting the fact that the original bookmarks were also hierarchical.

Insert the Table of Contents back into the original (current) document. By default, insert it after the first page in the document, but you can specify the exact location where you want to insert it.

When you scale a TOC page, the system does not scale the link boxes, which are part of the annotation layer.

Using the TOCBuilder Tool

Before using the TOCBuilder, you must first ensure that the document for which you wish to create a Table of Contents contains bookmarks, because if it does not, you will receive an error message when you attempt to run TOCBuilder. Consequently, you will not be able to proceed until you have first created bookmarks for that file. This step is crucial, as it allows TOCBuilder to effectively organize your document’s contents, but it also serves as a prerequisite to avoid potential disruptions in your workflow.

To create a table of contents for a single document:

  1. Open the document for which you wish to create a Table of Contents.
  2. Check the document contains bookmarks. If it does not then you must create them before using the TOCBuilder. You can use the BookMarker tool to do so if you wish. See the BookMarker chapter for details.
  3. Select Plug-Ins > Mapsoft >TOCBuilder … from the Acrobat main menu.

4.The Mapsoft TOCBuilder dialog box now appears.

TOCBuilder main window to build a table of contents in the PDF file
  1. Select the Template File radio button and then enter the name of the template file on which the new Table of Contents pages should be based. Alternatively, click the Blank Page radio button to base the new pages on a page found within the current document. (You can specify the appropriate page number of the page on which the new Table of Contents pages should be based.)
  2. In the Units field, select the units of measurement that you wish to use when specifying information for your Table of Contents entries control the units of measurement used in fields like Page Margins. By default, the system calculates these in Inches. However, you have the option to select Centimetres or Points from the drop-down list in the Units field.
  3. Next, set the margins you require for the Table of Contents pages in the Page Margins group of fields. To ensure consistency with the page margins throughout the rest of the document, you may want to set them the same. This way, when you insert the new Table of Contents pages, they will seamlessly align with the existing pages in the document.

    Additionally, you can specify a margin for the top of the first page if you want it to have a different top margin from the subsequent pages in the Table of Contents. This change accommodates templates that allocate more space to subsequent pages than to the first one.

  4. Now, make entries into the Contents Title group of fields. You can specify the text for the Table of Contents heading, along with its positioning and appearance on the page, using the options here.
  • Enter the heading you want to use for your Table of Contents in the Text field. For example, Table of Contents or simply Contents.
  • Select the font in which you wish this heading to appear in the completed Table of Contents. Choose from the available fonts shown in the drop-down list in the Font field.
  • Next select the font size using the drop-down list in the Size field.
  • Now specify the colour in the Colour field. Click on this field to display a Colour dialog box from where you can make your selection. See the Customised Colours section below for full details on selecting colours.
  • Specify the position on the page at which you wish the Table of Contents title to appear, by setting the X (horizontal) and Y (vertical) co-ordinates in the Top and Left fields respectively. These co-ordinates refer to the position of the text in relation to the top left of the page.
  • Specify the right margin to be used for the Table of Contents title into the Right Margin field.
  1. Next, select the properties to be used for first level entries within the Table of Contents. Options within the Level group control the appearance of entries within the Table of Contents:
  • First, in the Font field, select the font that is to be used for the highest level Table of Contents entries, or all entries in a flat Table of Contents structure, and then, as an example, choose Helvetica from the drop-down list available in this field, because it offers a clean and professional appearance, which is suitable for most documents.
  • Type the size of the heading’s font into the Size field (in points). For example, if you want a size of 10 points, you would enter “10” into the field. This action is necessary because it specifies the exact size for your heading, ensuring that it appears just as you intend on the document.
  • Type the line spacing to be used between Table of Contents entries into the Line Spacing field (in points). If you enter a size and then go on to modify another level you will find that TOCBuilder sets a sensible line spacing automatically.
  • Type the amount you need to indent this particular entry level from the left-hand margin into the Indent field. Measure this in the Units you selected in step 6.
  • Click the Colour button to open a Colour dialog box, allowing you to choose the text colour for Table of Contents entries at this specific level. For comprehensive details on selecting colours, refer to the Customised Colours section below.
  • Make sure to check the ‘Include Destination Page Numbering’ box (the default) if you want to include the page numbers of the actual content in the Table of Content entries. Also, make sure to check the ‘Include Leaders’ box (the default) if you want the Table of Contents entries to feature leading dots that connect each entry with its corresponding page number.
  1. If you want each Table of Content entry to be surrounded by a box (i.e. by a visible link) select the Line Width you require for those boxes from the Links field. You can choose if the line should be Thin, Medium or Thick. You can also select the colour of the line by clicking on the Colour field associated with the Links group. Clicking on this field displays a Colour dialog box from where you can make your selection. See the Customised Colours section below for full details on selecting colours
  2. Click Add Level to set this particular level of Table of Content entry.
  3. If creating a hierarchical Table of Contents, repeat steps 9 through 11 for each different heading level.

    As you add each new level it will appear in the box to the right of the TOCBuilder dialog box. Each new level will be nested below the previously defined one, thereby demonstrating the hierarchy that the Table of Contents will follow when it is created. This structure ensures clarity and coherence, as it logically organizes the content for easy navigation.

adding a new table of contents level

When you specify more levels than the defined bookmarks, the system will simply ignore any extra levels. For example, imagine you have defined three levels of bookmarks for a document, but you set five levels for the Table of Contents. In this case, the Contents list will nest only to three levels when generated. To nest to more levels, you must first define additional bookmark levels before running TOCBuilder.

You can remove a heading type from the Table of Contents list at any time simply by selecting the Level representing that heading type from the right-hand box in the TOCBuilder dialog box, and then clicking Remove Level. Any sub-levels will automatically be incremented by one level.

  1. Now, make entries into the TOC Numbering Options group of fields:
  • Enter the page number of the page that is to appear immediately after the Table of Contents in the Page After TOC is Number field. The page number you should use here is that which would appear on the page after the insertion point if it were printed.

    It is also important to note that bookmarks referring to pages prior to the insertion point will be ignored and will not appear in the TOC.

  • Specify the position in the document at which the Table of Contents is to be inserted in the Insert TOC at Page field. This can either before of after a specified page number.
  • If your document is divided into chapters, optionally, click the Restart Page Numbering if you wish page numbering to re-start afresh for each individual chapter. The chapter headings are considered to be the level1 bookmarks.
  • If you document is divided into chapters, optionally check the Show Chapter Numbering Starting At button and enter the number that should be used for the first chapter.
  • Choose if you want to exclude any bookmarks that don’t currently point to any pages by setting the Exclude Bookmarks that don’t Point to Pages checkbox. (This is set on by default.)
  • Click the Create ThumbNails for new pages check box if required.
  1. Optionally, enter a name in to the Configuration Name field and click its associated Save button to save your Table of Contents definition for later re-use with other files.
  2. Click OK to create the Table of Contents.

    The Table of Contents will be inserted into the specified location in your document once it has been generated.

 

Saving a TOCBuilder Configuration

To save a particular TOCBuilder configuration for later re-use, simply enter a name for it into the Configuration Name field, then click the Save button. This makes configuration available for re-use in another session of TOCBuilder. It also makes it available for use with Automator, Mapsoft’s unique automation tool which allows you to work with multiple files in batch mode.

Once saved, you can delete any existing TOCBuilder configurations you no longer require simply by selecting the appropriate one from the drop-down list in the Configuration Name field and then clicking the Delete button.

TOCBuilder Options

The following options can be set in the TOCBuilder dialog box:

TOC Pages

The file to be used as the template file when the Table of Contents pages are created. Choose from the following two options:
Template File The PDF file which is to act as a template for the new Table of Contents pages when they are created. You can type the name (and path) of the appropriate file into this field, or alternatively use the Browse button to locate and then select it. This template file can consist of one or two pages. If two pages in length, the first page will be used as the template for the first page of the new Table of Contents, while the second page will be used as the template for subsequent pages.
Blank Page The new Table of Contents will be based on a blank page

Units

The units of measurement to be used in calculating the positioning of the Table of Contents and the various entries within it. Choose from:
Inches (the default)
Centimetres
Points

Contents Title

Allows you to specify the Text to be used as the heading for the new Table of Contents, together with various properties relating to its appearance:
Text
The actual text to be used as the Table of Contents heading, for example, Table of Contents or Contents.
Font
The font of the heading, for example Helvetica. For maximum flexibility, you can select any Acrobat base font (shown in red in this field) or Type 1 (TrueType) font (shown in black) that is available on your system. However, if you choose a font that you do not have the ability to embed in your final document, then the generation of your Table of Contents will fail
Size
The heading size, in points.
Colour
You can specify the colour of the text you want to use for your Table of Contents heading. See the section Colour Options below for details.
Top
Position the Table of Contents heading at the specified horizontal position (in the units mentioned in the Units field) on the page, relative to the top left-hand edge of the page.
Left

Position the Table of Contents heading at the vertical position (in the units specified in the Units field) on the page in relation to the top left-hand edge of the page.
Right Margin
The size of the Table of Contents headings right margin (in the units specified in the Units field).

Page Margins

Define the Top, Bottom, Left, Right, and First Page Top margins for the Table of Contents pages you generate. Calculate these in the units you select in the Units field.

Level

You can set the properties related to each bookmark level for creating Table of Contents entries:
Font
The font of the heading, for example Helvetica.
Size
The heading size, in points.
Line Spacing
Specify the line spacing, in points, to use between Table of Contents entries.
Indent
Indent this type of entry by the amount (in the measurement unit specified in the Units field) to the right of the left margin.
Colour
You can specify the color of the text you want to use for your Table of Contents heading. See the section Colour Options below for details
Include Destination Page Numbering
Lists the appropriate page number next to each entry in the Table of Contents to show the page within that document where you can find the text associated with that entry.
Include Leaders
Includes leading dots between each Table of Contents entry and its associated page number.

Links

The Table of Contents entries include visible links. You can choose the border width for these links to be Thick, Thin, or Medium. You also have the option to select the border colour. By default, the system does not display a visible border around the Table of Contents entries.

Add Level

Adds the current Table of Contents text entry definition as a new level

Remove Level

The system removes the currently selected Table of Contents entry type from the hierarchical list of entry levels and automatically increments all sub-levels by one to ensure the hierarchy has no gaps.

TOC Numbering Options

Allows you to set properties relating to page numbering associated with Table of Contents:
Page After TOC is Number
Allows you to specify the page number that is to appear on the first page following the Table of Contents. This allows you to overcome any mismatch that may exist between Acrobats internal page numbers (used in calculating Table of Contents entries) and the physical page numbers actually shown on the relevant pages.
Insert TOC at Page
You can specify where to insert the Table of Contents in the document once you generate it. Choose from Before to insert the new Table of Contents before the specified Page or After
to insert the new Table of Contents after the specified Page. Specify the actual page number of the page before/after which the Table of Contents is to be inserted in the associated Page field. This is the internal page number of the page as used by Acrobat, and may not necessarily match the actual page number. It is also important to note that bookmarks referring to pages before the insertion point are ignored in the building of the table of content pages.
Restart Page Numbering
For documents that are divided into chapters, checking this option allows page numbering to start afresh at the beginning of each individual chapter.
Show Chapter Numbering Starting At
For documents that are divided into chapters, checking this option allows the page number to include a chapter number element, for example 1-1. The chapter numbering element will commence from the number specified here. Chapter headings are considered to be level1 bookmarks.
Exclude Bookmarks that don’t Point to Pages
When set, ignores any non-active action handlers when creating the table of contents. (This is set on by default.)
Create Thumbnails for New Pages
Check this checkbox to automatically create thumbnails for each page in the Table of Contents as you generate it. By default, we have set this option to off, meaning we do not create thumbnails.

Name Configuration

Allows you to saves the current Table of Contents definitions for later re-use with other files or for use with the Automator plug-in. Enter a name for this definition into the Name Configuration field and then click the Save button.

Remove Existing Table of Contents definitions by selecting them in the Name Configuration field and then clicking Remove.

OK

Commences the Table of Contents generation process.

 

Customised Colours

The TOCBuilder dialog box contains three Colour fields, one allowing you to set the colour of the Table of Contents heading, the other the colour of entries within the Table of Contents itself and the third allowing you to specify the colour of any links. All three fields operate in exactly the same way. Click once on any of the three fields to display the following Colour dialog box.

table of contents colors

Select the basic colour of your choice by simply clicking once on the square representing that colour and then clicking OK to return to the TOCBuilder dialog box.

Define a custom color

Alternatively, define your own customised colour. To do so, click once on one of the blank squares in the Custom Codes field and then click the Define Custom Codes. Make your selection in the additional dialog box that then displays, as in the example below.

table of contents color field