Introduction

The style options specify text style and layout of the text in the TOC. You can specify:

  • Font file is the path and name of the PostScript Type 1 font.
  • Font name is the name of the font.
  • Font size is the size of the font in points.
  • The leader character is the character from the end of the TOC entry text to the page number.
  • The line spacing.

The table below describes the elements of <TOC> style.

Contents of the <TOC> Style Element

Element Level Pro Required Content
<appendparam version=”1.0″> Top Topmost element, contains entire parameter spec
  ⇔   <toc> 2 Pro Table of contents information
       ⇔  <fontfile> 3 Pro Text: Name and path of the font file. This is required when specifying a PostScript Type 1 font.
           <fontname> 3 Pro Text: Name of the font [Times-Roman]
           <fontsize> 3 Pro Text: Size of the font [14]
           <leader> 3 Pro Text: Character of the leader
           <linespace> 3 Pro Text: Specify the line spacing [3]
           <appendblanklines> 3 Pro Empty: Adds additional blank lines after TOC entry — defaults to [3] unless <linespace> is set differently

XML Code Sample

<appendparam version="1.0">
 <!-- . Indicates skipped sections -->
 <!-- . -->
 <!-- . -->
   <TOC>
   <!-- . -->
   <!-- . -->
   <!-- . -->
      <fontfile>
         /fullpath/HVL_____.pfb
      </fontfile>
      <fontname>
         Helvetica-Light
      </fontname>
      <fontsize>
         12
      </fontsize>
      <leader>
         .
      </leader>
      <linespace>
         4
      </linespace>
      <appendblanklines/>
   <!-- . -->
   <!-- . -->
   <!-- . -->
   </TOC>

Elements for <TOC> style

fontfile

Specifies the name and path of the font file. This is required when specifying a PostScript Type 1 font.

If you specify a PostScript Type 1 font, you must supply the font name (<fontname>), and the path and name of the font file:

  • Type 1 fonts use two files, a .pfb and a .pfm file. Both files need to be in the same directory, but you specify the .pfb file for <fontfile>.
  • If there is a conflict between font name and font file, the information in the font file overrides the font name.

fontname

Specifies the name of the font for the TOC text. The default is Times-Roman.

There are two types of fonts AppendPDF Pro can use:

  • One of the Base 14 fonts
  • A PostScript Type 1 font

The names of the Base 14 fonts are:

  • Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique
  • Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-BoldOblique
  • Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic
  • Symbol
  • ZapfDingbats

If you use a PostScript Type 1 font, specify the PostScript name of the font. Refer to the font user documentation for the exact spelling of the font name.

You cannot use TrueType or OpenType fonts with AppendPDF Pro. If you use a font other than a Base 14 font, it must be a PostScript Type 1 font.

fontsize

Specifies the size of the font for the TOC text. Fractional point sizes are supported (14.5) The default is 14 points.

leader

Specifies the leader character used in the space from the end of the text to the page number.

Usage note for <leader>

  • If you do not specify a leader, long TOC entries will wrap to a new line. Consider this when choosing <linespace> or TOC entries may overlap each other.
  • If you have long lines that may wrap, do not specify a leader. Long lines may be truncated with a leader specified.
  • You can use <pagecolumnwidth> to tighten or loosen up the space between the page numbers and the leader. See pagecolumnwidth for more information.

linespace

Specifies the line spacing of the TOC text. The default is 3 lines.

Line spacing is specified as:

  • 0 = bookmarks are created, but no TOC text is applied to the TOC page.
  • 1 = single spacing
  • 2 = double spacing
  • 3 = triple spacing, and so on…

The default value is 3. Refer to the Usage note for <leader> above for more information.

appendblanklines

Adds blank lines after the last line of the TOC entry, using the value of <linespace>. Without <appendblanklines> set, AppendPDF Pro counts line spaces from the first line of the TOC entry.

For example: When <appendblanklines> is set, if a TOC entry is 3 lines, the line space count will begin after the third line; if the TOC entry is 2 lines, the line space count will begin after the second line of that entry. If <appendblanklines> is not set, the line space count always begins with the first TOC line. See the example below for an illustration.

<appendblanklines> is not set in the parameter file: <appendblanklines> is set in the parameter file:
TOC Page with appendblanklines not set

Use this option to control the spacing between page numbers:

  • <linespace> is set to 3 (default).
  • <appendblanklines> option is not set.
  • The line count starts at the first line of the TOC entry; the spacing between page numbers (first TOC lines) is consistent.
TOC Page with appendblanklines set

Use this option to control the spacing between TOC entries:

  • <linespace> is set to 3 (default).
  • <appendblanklines> option is set.
  • There are 3 lines added between each TOC entry; the line spacing between entries is consistent.

Examples

Specifying style

To specify the style as shown in the table above.

      <fontname>
         Times-Roman
      </fontname>
      <fontsize>
         14
      </fontsize>
      <leader>
         .
      </leader>
      <linespace>
         3
      </linespace>

To specify the Type 1 Font News Gothic:

      <fontfile>
         /fullpath/NewsGot.pfb
      </fontfile>
      <fontname>
         NewsGothic
      </fontname>
      <fontsize>
         10
      </fontsize>
      <leader>
         -
      </leader>
      <linespace>
         2
      </linespace>