Package com.evopdf
Class PdfDocumentTableOfContents
java.lang.Object
com.evopdf.TableOfContentsOptions
com.evopdf.PdfDocumentTableOfContents
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStartDocument
(InputStream pdfStream, boolean enableHeaderAndFooter, boolean drawHeaderOnFirstPage, boolean drawFooterOnFirstPage) Adds a PDF document from the given stream before the table of contentsvoid
addStartDocument
(String pdfFile, boolean enableHeaderAndFooter, boolean drawHeaderOnFirstPage, boolean drawFooterOnFirstPage) Adds a PDF document from the given file before the table of contents conversionboolean
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
-
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 contentsenableHeaderAndFooter
- 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 documentdrawHeaderOnFirstPage
- a flag indicating if the header is drawn on first page of the appended documentdrawFooterOnFirstPage
- 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 resultenableHeaderAndFooter
- 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 documentdrawHeaderOnFirstPage
- a flag indicating if the header is drawn on first page of the appended documentdrawFooterOnFirstPage
- 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
-