Class FootnoteManager
java.lang.Object
com.openhtmltopdf.layout.FootnoteManager
The footnote manager which is only created if footnotes are detected in
the document. See
LayoutContext.getFootnoteManager()-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<BlockBox, FootnoteManager.FootnoteArea> private final Map<PageBox, FootnoteManager.FootnoteArea> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFootnoteBody(LayoutContext c, BlockBox footnoteBody, LineBox line) Adds a footnote body to the line box page, creating the footnote area as required.private voidprivate FootnoteManager.FootnoteAreacreateFootnoteArea(LayoutContext c, PageBox page) private BlockBoxcreateFootnoteAreaBlock(LayoutContext c, PageBox footnoteCallPage) Sets up the footnote area.private voidpositionFootnoteArea(LayoutContext c, FootnoteManager.FootnoteArea area, PageBox firstPage, int lineHeight, boolean allowRepeat) voidremoveFootnoteBodies(LayoutContext c, List<BlockBox> footnoteBodies, LineBox line) Removes footnotes.private voidreserveSubsequentPagesForFootnoteArea(LayoutContext c, FootnoteManager.FootnoteArea area, int desiredHeight, int footnoteTop, int startAt)
-
Field Details
-
_footnoteAreas
-
_containerMap
-
-
Constructor Details
-
FootnoteManager
public FootnoteManager()
-
-
Method Details
-
createFootnoteArea
-
createFootnoteAreaBlock
Sets up the footnote area. -
positionFootnoteArea
private void positionFootnoteArea(LayoutContext c, FootnoteManager.FootnoteArea area, PageBox firstPage, int lineHeight, boolean allowRepeat) -
reserveSubsequentPagesForFootnoteArea
private void reserveSubsequentPagesForFootnoteArea(LayoutContext c, FootnoteManager.FootnoteArea area, int desiredHeight, int footnoteTop, int startAt) -
clearFootnoteAreaPages
-
addFootnoteBody
Adds a footnote body to the line box page, creating the footnote area as required.
Important: This changes the page break point by expanding the footnote area. It also reserves subsequent pages if required for the footnote area.
If the line box is moved to a different page, one must callremoveFootnoteBodies(LayoutContext, List, LineBox)before the page change and this method again after. -
removeFootnoteBodies
Removes footnotes. This is used when a line is moved to a new page. We remove from first page and add to the next.
-