public class TableOfContentsCreator extends Object
| Constructor and Description |
|---|
TableOfContentsCreator(MergeParameters params,
org.sejda.sambox.pdmodel.PDDocument document) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToC()
Generates a ToC and prepend it to the given document
|
void |
addToC(int beforePageNumber)
Generates a ToC and inserts it in the doc at before the given page number
|
void |
appendItem(String text,
long pageNumber,
org.sejda.sambox.pdmodel.PDPage page)
Adds to the ToC the given text with the given annotation associated
|
float |
getFontSize() |
boolean |
hasToc() |
void |
pageSizeIfNotSet(org.sejda.sambox.pdmodel.common.PDRectangle pageSize) |
boolean |
shouldGenerateToC() |
long |
tocNumberOfPages() |
public TableOfContentsCreator(MergeParameters params, org.sejda.sambox.pdmodel.PDDocument document)
public void appendItem(String text, long pageNumber, org.sejda.sambox.pdmodel.PDPage page)
text - pageNumber - page - public void addToC()
throws TaskException
TaskExceptionpublic void addToC(int beforePageNumber)
throws TaskException
TaskExceptionpublic boolean hasToc()
public boolean shouldGenerateToC()
public void pageSizeIfNotSet(org.sejda.sambox.pdmodel.common.PDRectangle pageSize)
public float getFontSize()
public long tocNumberOfPages()
Copyright © 2019 sejda. All rights reserved.