java.lang.Object
org.sejda.impl.sambox.component.TableOfContentsCreator
Component creating a table of content
- Author:
- Andrea Vacondio
-
Constructor Summary
ConstructorsConstructorDescriptionTableOfContentsCreator(MergeParameters params, org.sejda.sambox.pdmodel.PDDocument document) -
Method Summary
Modifier and TypeMethodDescriptionintaddToC()Generates a ToC and prepend it to the given documentintaddToC(int beforePageNumber) Generates a ToC and inserts it in the doc at before the given page numbervoidappendItem(String text, long pageNumber, org.sejda.sambox.pdmodel.PDPage page) Adds to the ToC the given text with the given annotation associatedfloatbooleanhasToc()voidpageSizeIfNotSet(org.sejda.sambox.pdmodel.common.PDRectangle pageSize) boolean
-
Constructor Details
-
TableOfContentsCreator
-
-
Method Details
-
appendItem
Adds to the ToC the given text with the given annotation associated- Parameters:
text-pageNumber-page-
-
addToC
Generates a ToC and prepend it to the given document- Throws:
TaskException- if there is an error generating the ToC
-
addToC
Generates a ToC and inserts it in the doc at before the given page number- Throws:
TaskException- if there is an error generating the ToC
-
hasToc
public boolean hasToc() -
shouldGenerateToC
public boolean shouldGenerateToC() -
pageSizeIfNotSet
public void pageSizeIfNotSet(org.sejda.sambox.pdmodel.common.PDRectangle pageSize) -
getFontSize
public float getFontSize()
-