Skip to content

# PDFFlowDocumentTOCSettings

Namespace: O2S.Components.PDF4NET.FlowDocument

Defines the settings for creating the table of contents in a flow document.

    public class PDFFlowDocumentTOCSettings

Inheritance Object → PDFFlowDocumentTOCSettings

## Constructors

### PDFFlowDocumentTOCSettings()

Initializes a new PDFFlowDocumentTOCSettings object.

    public PDFFlowDocumentTOCSettings()

## Properties

### ContentsEntryFiller

Gets or sets the contents entry filler.

    public char ContentsEntryFiller { get; set; }

Property Value

Char
The character, usually a dot, used to provide a visual connection between the heading text and page number in the table of contents.

Remarks

The character is multiplied as necessary to fill the space between the heading text and the page number.
This property is used if PDFFlowDocumentTOCSettings.GenerateContentsPage property is true.

### ContentsEntrySpacingAfter

Gets or sets the spacing after a table of contents entry.

    public double ContentsEntrySpacingAfter { get; set; }

Property Value

Double
The space in points below the table of contents entry.

Remarks

This property is used if PDFFlowDocumentTOCSettings.GenerateContentsPage property is true.

### ContentsEntrySpacingBefore

Gets or sets the spacing before a table of contents entry.

    public double ContentsEntrySpacingBefore { get; set; }

Property Value

Double
The space in points above the table of contents entry.

Remarks

This property is used if PDFFlowDocumentTOCSettings.GenerateContentsPage property is true.

### ContentsHeadingIndent

Gets or sets the heading indent.

    public double ContentsHeadingIndent { get; set; }

Property Value

Double
Indentation space from left margin for headings and sub-headings.

Remarks

Level 1 headings are aligned to page's left margin. Level 2 headings are indented with PDFFlowDocumentTOCSettings.ContentsHeadingIndent space, level 3 headings are indented with 2 * PDFFlowDocumentTOCSettings.ContentsHeadingIndent space, and so on.
This property is used if PDFFlowDocumentTOCSettings.GenerateContentsPage property is true.

### ContentsPageNumbers

Gets or sets the collection of page numbers.

    public Dictionary<PDFPage, string> ContentsPageNumbers { get; set; }

Property Value

Dictionary<PDFPage, String>
The page numbers to be displayed for the pages that appear in the table of contents.

Remarks

The pairs in this collection specify a page and a number (or any string that can server as page number). If the page appears in the table of contents (because it contains a heading that is included in the table of contents) the corresponding page number will be displayed for the heading.

### ContentsPagePosition

Gets or sets the contents page position in the document.

    public int ContentsPagePosition { get; set; }

Property Value

Int32
Position in the document where the contents page is inserted. A negative value means that the contents page is added at the end of the document.

Remarks

This property is used if PDFFlowDocumentTOCSettings.GenerateContentsPage property is true.

### ContentsTextColor

Gets or sets the table of contents color.

    public PDFBrush ContentsTextColor { get; set; }

Property Value

PDFBrush
The brush used for displaying the entries in the table of contents.

Remarks

This property is used if PDFFlowDocumentTOCSettings.GenerateContentsPage property is true.

### ContentsTextFont

Gets or sets the font for displaying the contents text.

    public PDFFont ContentsTextFont { get; set; }

Property Value

PDFFont
The font used for displaying the entries in the table of contents.

Remarks

This property is used if PDFFlowDocumentTOCSettings.GenerateContentsPage property is true.

### ContentsTitle

Gets or sets the table of contents title.

    public PDFFlowContent ContentsTitle { get; set; }

Property Value

PDFFlowContent
A flow content object used as title for the table of contents.

Remarks

Usually this property is a string like "Contents" or "Table of Contents"

### GenerateContentsPage

Gets or sets a value indicating whether the table of contents should be generated as separate pages in the document.

    public bool GenerateContentsPage { get; set; }

Property Value

Boolean
If true pages containing the table of contents are added to the document.

### GenerateDocumentOutline

Gets or sets a value indicating whether the table of contents should be generated as document outline (bookmarks).

    public bool GenerateDocumentOutline { get; set; }

Property Value

Boolean
If true the document outline should be generated from the headings in the document.

### MaxHeadingLevelForContentsPage

Gets or sets the maximum heading level to be included in the contents page.

    public uint MaxHeadingLevelForContentsPage { get; set; }

Property Value

UInt32
Maximum heading level to be included in the contents page. 0 means all levels.

Remarks

This property is used if PDFFlowDocumentTOCSettings.GenerateContentsPage property is true.

### MaxHeadingLevelForDocumentOutline

Gets or sets the maximum heading level to be included in the document outline.

    public uint MaxHeadingLevelForDocumentOutline { get; set; }

Property Value

UInt32
Maximum heading level to be included in the document outline. 0 means all levels.

### ParentStructureElementForTableOfContents

Gets or sets the parent structure element for the table of contents.

    public PDFStructureElement ParentStructureElementForTableOfContents { get; set; }

Property Value

PDFStructureElement
A PDFStructureElement object representing the parent for the structure elements that define the table of contents.