Table of Contents

Class PdfDocumentTableOfContents

Namespace
EvoPdf
Assembly
evohtmltopdf.dll

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

[ClassInterface(ClassInterfaceType.AutoDual)]
public class PdfDocumentTableOfContents : TableOfContentsOptions
Inheritance
PdfDocumentTableOfContents
Inherited Members

Constructors

PdfDocumentTableOfContents()

public PdfDocumentTableOfContents()

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

public bool AutoCloseExternalDocs { get; set; }

Property Value

bool

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

public bool ResetLevelBeforeElement { get; set; }

Property Value

bool

Methods

AddStartDocument(Document, bool, bool, bool)

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.

public void AddStartDocument(Document pdfDocument, bool enableHeaderAndFooter, bool drawHeaderOnFirstPage, bool drawFooterOnFirstPage)

Parameters

pdfDocument Document

The document to be inserted before the table of contents

enableHeaderAndFooter bool

A flag indicating if the header and footer can be applied to the added document when the document was created from an external file or stream. If this parameter is true then the interactive features like links and bookmarks are disabled in the added PDF document

drawHeaderOnFirstPage bool

A flag indicating if the header is drawn on first page of the appended document

drawFooterOnFirstPage bool

A flag indicating if the footer is drawn in first page of the appended document

AddStartDocument(Stream, bool, bool, bool)

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

public void AddStartDocument(Stream pdfStream, bool enableHeaderAndFooter, bool drawHeaderOnFirstPage, bool drawFooterOnFirstPage)

Parameters

pdfStream Stream

The stream from where to read the PDF document to be inserted before the table of contents

enableHeaderAndFooter bool

A flag indicating if the header and footer can be applied to the added document. If this parameter is true then the interactive features like links and bookmarks are disabled in the added PDF document

drawHeaderOnFirstPage bool

A flag indicating if the header is drawn on first page of the appended document

drawFooterOnFirstPage bool

A flag indicating if the footer is drawn in first page of the appended document

AddStartDocument(string, bool, bool, bool)

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

public void AddStartDocument(string pdfFile, bool enableHeaderAndFooter, bool drawHeaderOnFirstPage, bool drawFooterOnFirstPage)

Parameters

pdfFile string

The full path of the PDF file to be inserted before the table of contents

enableHeaderAndFooter bool

A flag indicating if the header and footer can be applied to the added document. If this parameter is true then the interactive features like links and bookmarks are disabled in the added PDF document

drawHeaderOnFirstPage bool

A flag indicating if the header is drawn on first page of the appended document

drawFooterOnFirstPage bool

A flag indicating if the footer is drawn in first page of the appended document