public class TableOfContents
extends com.itextpdf.text.pdf.PdfPageEventHelper
| Modifier and Type | Class and Description |
|---|---|
static class |
TableOfContents.Entry |
| Constructor and Description |
|---|
TableOfContents(PageNumber pageNumber) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntry(String text,
int level,
PageInfos pageInfos,
String anchorDst) |
List<TableOfContents.Entry> |
getEntries() |
void |
onChapter(com.itextpdf.text.pdf.PdfWriter writer,
com.itextpdf.text.Document document,
float paragraphPosition,
com.itextpdf.text.Paragraph title)
Called when a Chapter is written.
|
void |
onSection(com.itextpdf.text.pdf.PdfWriter writer,
com.itextpdf.text.Document document,
float paragraphPosition,
int depth,
com.itextpdf.text.Paragraph title)
Called when a Section is written.
|
PageNumber |
pageNumber() |
public TableOfContents(PageNumber pageNumber)
public List<TableOfContents.Entry> getEntries()
public PageNumber pageNumber()
public void onSection(com.itextpdf.text.pdf.PdfWriter writer,
com.itextpdf.text.Document document,
float paragraphPosition,
int depth,
com.itextpdf.text.Paragraph title)
position will hold the height at which the
section will be written to.onSection in interface com.itextpdf.text.pdf.PdfPageEventonSection in class com.itextpdf.text.pdf.PdfPageEventHelperwriter - the PdfWriter for this documentdocument - the documentparagraphPosition - the position the section will be written todepth - the number depth of the Sectiontitle - the title of the sectionpublic void onChapter(com.itextpdf.text.pdf.PdfWriter writer,
com.itextpdf.text.Document document,
float paragraphPosition,
com.itextpdf.text.Paragraph title)
position will hold the height at which the
chapter will be written to.onChapter in interface com.itextpdf.text.pdf.PdfPageEventonChapter in class com.itextpdf.text.pdf.PdfPageEventHelperwriter - the PdfWriter for this documentdocument - the documentparagraphPosition - the position the chapter will be written totitle - the title of the ChapterCopyright © 2014. All Rights Reserved.