Package com.evopdf

# Class PdfDocumentTableOfContents

java.lang.Object
com.evopdf.TableOfContentsOptions
com.evopdf.PdfDocumentTableOfContents

public class PdfDocumentTableOfContents extends TableOfContentsOptions
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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PdfDocumentTableOfContents()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addStartDocument(InputStream pdfStream, boolean enableHeaderAndFooter, boolean drawHeaderOnFirstPage, boolean drawFooterOnFirstPage)`
  Adds a PDF document from the given stream before the table of contents
  `void`
  `addStartDocument(String pdfFile, boolean enableHeaderAndFooter, boolean drawHeaderOnFirstPage, boolean drawFooterOnFirstPage)`
  Adds a PDF document from the given file before the table of contents conversion
  `boolean`
  `resetLevelBeforeElement()`
  Gets the flag indicating if the table of contents items level is reset before each HTML to PDF and HTML to Image element added to document.
  `void`
  `setResetLevelBeforeElement(boolean reset)`
  Sets flag indicating if the table of contents items level is reset before each HTML to PDF and HTML to Image element added to document.

  ### Methods inherited from class com.evopdf.TableOfContentsOptions

  `autoTocItemsEnabled, backColor, globalStyle, maxTocItemTitleLength, pageCount, pageNumberingStartIndex, pageNumbersEnabled, setAutoTocItemsEnabled, setBackColor, setGlobalStyle, setItemStyle, setMaxTocItemTitleLength, setPageNumberingStartIndex, setPageNumbersEnabled, setPageNumberStyle, setShowFooter, setShowHeader, setStartPageNumbersAfterTOC, setTitle, setTitleStyle, setWidth, showFooter, showHeader, startPageIndex, startPageNumbersAfterTOC, title, titleStyle, width`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PdfDocumentTableOfContents

    public PdfDocumentTableOfContents()

- ## Method Details

  - ### addStartDocument

    public void addStartDocument(String pdfFile, boolean enableHeaderAndFooter, boolean drawHeaderOnFirstPage, boolean drawFooterOnFirstPage)
    Adds a PDF document from the given file before the table of contents conversion
    Parameters:
      `pdfFile` - the full path of the PDF file to be inserted before the table of contents
      `enableHeaderAndFooter` - 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` - a flag indicating if the header is drawn on first page of the appended document
      `drawFooterOnFirstPage` - a flag indicating if the footer is drawn in first page of the appended document

  - ### addStartDocument

    public void addStartDocument(InputStream pdfStream, boolean enableHeaderAndFooter, boolean drawHeaderOnFirstPage, boolean drawFooterOnFirstPage)
    Adds a PDF document from the given stream before the table of contents
    Parameters:
      `pdfStream` - the stream from where to read the PDF document to be inserted before conversion result
      `enableHeaderAndFooter` - 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` - a flag indicating if the header is drawn on first page of the appended document
      `drawFooterOnFirstPage` - a flag indicating if the footer is drawn in first page of the appended document

  - ### resetLevelBeforeElement

    public boolean resetLevelBeforeElement()
    Gets the flag indicating 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.
    Returns:
      the flag indicating if the table of contents items level is reset before each HTML to PDF and HTML to Image element added to document.

  - ### setResetLevelBeforeElement

    public void setResetLevelBeforeElement(boolean reset)
    Sets flag indicating 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.
    Parameters:
      `reset` - the flag value to set