Class XWPFFootnotes


public class XWPFFootnotes extends XWPFAbstractFootnotesEndnotes
Looks after the collection of Footnotes for a document. Manages bottom-of-the-page footnotes (XWPFFootnote).
  • Constructor Details

    • XWPFFootnotes

      public XWPFFootnotes(PackagePart part)
      Construct XWPFFootnotes from a package part
      Parameters:
      part - the package part holding the data of the footnotes,
      Since:
      POI 3.14-Beta1
    • XWPFFootnotes

      public XWPFFootnotes()
      Construct XWPFFootnotes from scratch for a new document.
  • Method Details

    • setFootnotes

      @Internal public void setFootnotes(CTFootnotes footnotes)
      Sets the ctFootnotes
      Parameters:
      footnotes - Collection of CTFntEdn objects.
    • createFootnote

      public XWPFFootnote createFootnote()
      Create a new footnote and add it to the document.
      Returns:
      New XWPFFootnote
      Since:
      4.0.0
    • removeFootnote

      public boolean removeFootnote(int pos)
      Remove the specified footnote if present.
      Parameters:
      pos - Array position of the footnote to be removed
      Returns:
      True if the footnote was removed.
      Since:
      4.0.0
    • addFootnote

      public void addFootnote(XWPFFootnote footnote)
      Add an XWPFFootnote to the document
      Parameters:
      footnote - Footnote to add
    • addFootnote

      @Internal public XWPFFootnote addFootnote(CTFtnEdn note)
      Add a CT footnote to the document
      Parameters:
      note - CTFtnEdn to add.
    • getFootnotesList

      public List<XWPFFootnote> getFootnotesList()
      Get the list of XWPFFootnote in the Footnotes part.
      Returns:
      List, possibly empty, of footnotes.