PdfDocumentTableOfContents Class

This class contains the necessary properties to control the creation of a table of contents in a PDF document based on the HTML to PDF and HTML to Image elements added to document

Definition

Namespace: EvoPdf
Assembly: EvoHtmlToPdf_NetCore (in EvoHtmlToPdf_NetCore.dll) Version: 11.0.0
C#
public class PdfDocumentTableOfContents : TableOfContentsOptions
Inheritance
Object    TableOfContentsOptions    PdfDocumentTableOfContents

Constructors

PdfDocumentTableOfContentsInitializes a new instance of the PdfDocumentTableOfContents class

Properties

AutoCloseExternalDocs This flag indicates if the external documents added by the AddStartDocument() are automatically closed after the final document was generated. By default the external documents are closed
AutoTocItemsEnabled A flag indicating if the automatic creation of a table of contents items for the H1 to H6 HTML elements is enabled or not. By default this property is false
(Inherited from TableOfContentsOptions)
BackColor The background color of the PDF pages on which the table of contents is created
(Inherited from TableOfContentsOptions)
GlobalStyle Gets or sets the global CSS style of the table of contents. For example, setting a "body{background-color:blue}" will set a blue color for the table of contents background
(Inherited from TableOfContentsOptions)
MaxTocItemTitleLength Gets or sets the maximum accepted length of the table of contents item title. If a positive value is set for this property the table of contents item title will be truncated if necessary. By default the table of contents item title will not be truncated
(Inherited from TableOfContentsOptions)
PageCount Returns the number of pages on which the table of contents is created and together with the StartPageIndex helps to localize the position of the table of contents inside the generated PDF document. This property is set by converter after the document with table of contents was generated
(Inherited from TableOfContentsOptions)
PageNumberingStartIndex Gets or sets the start index for page numbering in the table of contents. This property can be correlated with the PageNumberingStartIndex property of header and footer
(Inherited from TableOfContentsOptions)
PageNumbersEnabled A flag indicating if the table of contents items will have page numbers besides the title. By default this property is true
(Inherited from TableOfContentsOptions)
ResetLevelBeforeElement This flag indicates if the table of contents items level is reset before each HTML to PDF and HTML to Image element added to document. By default this property is true
ShowFooter A flag indicating if the document footer is displayed on the table of content pages or not
(Inherited from TableOfContentsOptions)
ShowHeader A flag indicating if the document header is displayed on the table of content pages or not
(Inherited from TableOfContentsOptions)
StartPageIndex Returns the index in PDF document of the page where the table of contents starts. This property is set by converter after the document with table of contents was generated
(Inherited from TableOfContentsOptions)
StartPageNumbersAfterTOC A flag indicating if the page numbers start after the table of contents. This property also changes the page numbering both in document header and footer and in the table of contents
(Inherited from TableOfContentsOptions)
Title Gets or sets the table of contents title
(Inherited from TableOfContentsOptions)
TitleStyle Gets or sets the global CSS style of the table of contents title. When this property is set with a value, the default style of the title is replaced with the style given by this property. For example, setting a "font-family: 'Times New Roman'; font-size:30px; font-weight:bold; color:red" style will make the converter to use the 'Times New Roman' bold font of 30 pixels and the blue color to write the table of contents title
(Inherited from TableOfContentsOptions)
Width Gets or sets the table of contents width in pixels. The table can be resized if necessary to fit the PDF page width. If the property is 0 then the converter will automatically set the width of the table of contents
(Inherited from TableOfContentsOptions)

Methods

AddStartDocument(Document, Boolean, Boolean, Boolean) Adds a PDF document object before the table of contents. If the AutoCloseExternalDocs property is true the added document will be automatically closed when the final document is closed or saved.
AddStartDocument(Stream, Boolean, Boolean, Boolean) Adds a PDF document from the given stream before the table of contents. If the AutoCloseExternalDocs property is true the added document will be automatically closed when the final document is closed or saved
AddStartDocument(String, Boolean, Boolean, Boolean) Adds a PDF document from the given file before the table of contents. If the AutoCloseExternalDocs property is true the added document will be automatically closed when the final document is closed or saved
Equals
(Inherited from Object)
Finalize
(Inherited from Object)
GetHashCode
(Inherited from Object)
GetType
(Inherited from Object)
MemberwiseClone
(Inherited from Object)
SetItemStyle Sets the style of a table of contents item on a given level. The item level is a number from 1 to 6
(Inherited from TableOfContentsOptions)
SetPageNumberStyle Sets the style of the page page numbers on a given level in the table of contents. The page number level is a number from 1 to 6
(Inherited from TableOfContentsOptions)
ToString
(Inherited from Object)

See Also