Click or drag to resize
Pdf Library for .NET

PdfTableOfContentsOptions Properties

The PdfTableOfContentsOptions type exposes the following members.

Properties
 NameDescription
Public propertyContainerSelector Gets or sets the CSS selector of the element that holds the page's table of contents, for example "#toc". Used by FillExisting.
Public propertyHeadingSelectors Gets or sets the CSS selectors of the headings the table of contents lists, one per level: the first selector is level 1. Used by InsertHtml.
Public propertyHtmlPlacement Gets or sets where InsertHtml writes the table of contents. The default value is Start.
Public propertyIncludeDefaultCss Gets or sets whether the default stylesheet of the table of contents written by InsertHtml is added. When false the page's CSS alone styles it. The default value is true.
Public propertyLeader Gets or sets the leader drawn between an entry and its page number. The default value is Dots.
Public propertyLeaderColor Gets or sets the color of the leader. The default value is Empty, which uses the color of the page numbers.
Public propertyLeaderGap Gets or sets the space, in points, between an entry and its leader and between the leader and the page number. The default value is 3.
Public propertyLevelStyles Gets or sets the appearance of the entries of each level drawn by GeneratePages: the first style is level 1. A level beyond the array uses the last style; a property left at its default takes the level's default.
Public propertyMaxLevel Gets or sets the deepest level listed by GeneratePages and InsertHtml. The default value is 0, which lists every level.
Public propertyMode Gets or sets how the table of contents is built. The default value is None.
Public propertyNumberColumnWidth Gets or sets the width, in CSS pixels, kept free at the end of each entry written by InsertHtml, so that a long entry wraps before its page number. The default value is 40.
Public propertyNumberEntries Gets or sets whether the entries drawn by GeneratePages are numbered ("1.", "1.1.", ...). The default value is false.
Public propertyPageBackColor Gets or sets the background color of the content area of the pages drawn by GeneratePages (the whole page when the margins are 0), so they can match a page with a colored background. The default value is Empty: no background.
Public propertyPageBreak Gets or sets whether the table of contents written by InsertHtml gets a page of its own: a page break after it, or before it when it is placed at the end. No break is added after it when the content that follows already starts a new page. The default value is true.
Public propertyPageNumberColor Gets or sets the color of the page numbers. The default value is Empty, which uses the color of the entry's text.
Public propertyPageNumberFont Gets or sets the font of the page numbers. The default value is null, which draws them in Helvetica at the size of the entry's text, or in the entry's own font for GeneratePages.
Public propertyPageNumberRightInset Gets or sets the distance, in points, between the page numbers and the right edge of the table of contents. The default value is 0.
Public propertyPagePosition Gets or sets where GeneratePages inserts its pages. The default value is Start.
Public propertyPlaceholderSelector Gets or sets the CSS selector of the element the table of contents is written into when HtmlPlacement is Placeholder.
Public propertyTitle Gets or sets the title written above the table of contents by InsertHtml. Null or empty writes no title. The default value is "Contents".
Public propertyTitleAlign Gets or sets the alignment of the title drawn by GeneratePages. A left-aligned title starts at the indent of the level 1 entries. The default value is Left.
Public propertyTitleColor Gets or sets the color of the title drawn by GeneratePages. The default value is Empty, which is black.
Public propertyTitleFont Gets or sets the font of the title drawn by GeneratePages. The default value is null, which is Helvetica Bold 18.
Public propertyTitleSpacingAfter Gets or sets the space, in points, between the title and the first entry drawn by GeneratePages. The default value is 12.
Public propertyTitleSpacingBefore Gets or sets the space, in points, above the title drawn by GeneratePages, from the top of the content area. The default value is 0.
Top
See Also