Document Templates configurations

concept brazil Updated Sep 10, 2026 2 min read doc-template-configs.md
Raw file servicenow.com

Use Document Templates configurations to generate table of contents and page numbers on a PDF document that is generated from an HTML template.

Note: Only if the com.snc.pdfgenerator.html2pdf.api.version property is set to 2 (default), the Table of Contents and Page number configuration features are available to use. If the com.snc.pdfgenerator.html2pdf.api.version property is set to 1, the Table of Contents and Page number configuration features are not available to use.

Create a TOC configuration in Document Templates

Create a TOC configuration to generate Table of Contents in a PDF document that is generated from an HTML document.

Before you begin

Role required: sn_doc.writer

Procedure

  1. Navigate to Document Templates > Document Configuration > Table of Contents Configurations.

  2. Click New.

  3. On the form, fill in the fields:

Field

Description

Name

Name of the Table of Contents configuration.

Title

Table of Contents title that appears in the generated document.

Type

Table of Contents is displayed in a list view in the generated PDF document.

Heading numbering

Format in which you want the page numbers of the headings to be displayed. The values are:- None

  • Decimal

Table leader

Gap between the heading and page number. Table leader helps to correlate a section or a heading with its page number. The values are:- None

  • Dotted

Clickable

Enable or disable clickable links inside the generated Table of Contents.

Show page numbers

Option to display page numbers on the generated PDF document.Note: This option makes the page number configuration field on the document template mandatory.

Application

Application scope in which the TOC configuration is created.

Start numbering after table of contents

Option to begin page numbers after TOC ends.Note:

  • This field appears only when the Show page numbers field is enabled.
  • This field overrides the Start numbering from page field in page number configuration.
4. Click **Submit**.

Create a page number configuration in Document Templates

Create a page number configuration to automatically generate page numbers in a PDF document that is generated from an HTML document.

Before you begin

Role required: sn_doc.writer

Procedure

  1. Navigate to Document Templates > Document Configuration > Page Number Configurations.

  2. Click New.

  3. On the form, fill in the fields:

Field

Description

Name

Name of page number configuration.

Page number format

Format in which page numbers are displayed on the generated PDF document: Decimal

Start numbering from page

Page from which you want the numbering to begin.Note: The value in this field is overridden by the Start numbering after table of contents in TOC configuration.

Application

Application scope in which the page number configuration is created.

Position

Vertical position of the page number: Header or Footer

Horizontal alignment

Horizontal alignment of the page number: Left, Center, or Right

4. Click **Submit**.
Search documentation
Search document titles and file paths on the brazil branch