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 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