com.aspose.words

Class FootnoteType

  • java.lang.Object
    • com.aspose.words.FootnoteType
public class FootnoteType 
extends java.lang.Object

Utility class containing constants. Specifies whether this is a footnote or an endnote.

Both footnotes and endnotes are represented by objects by the FOOTNOTE class. Use Footnote.FootnoteType to distinguish between footnotes and endnotes.

Example:

Shows how to add a footnote to a paragraph in the document using DocumentBuilder.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

for (int i = 0; i <= 100; i++)
{
    builder.write("Some text " + i);

    builder.insertFootnote(FootnoteType.FOOTNOTE, "Footnote text " + i);
    builder.insertFootnote(FootnoteType.FOOTNOTE, "Footnote text " + i, "242");
}

Example:

Shows how to add a footnote to a paragraph in the document.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.write("Some text is added.");

Footnote footnote = new Footnote(doc, FootnoteType.FOOTNOTE);
builder.getCurrentParagraph().appendChild(footnote);
footnote.getParagraphs().add(new Paragraph(doc));
footnote.getFirstParagraph().getRuns().add(new Run(doc, "Footnote text."));
See Also:
FOOTNOTE

Field Summary
static final intFOOTNOTE = 0
The object is a footnote.
static final intENDNOTE = 1
The object is an endnote.
 

    • Field Detail

      • FOOTNOTE = 0

        public static final int FOOTNOTE
        The object is a footnote.
      • ENDNOTE = 1

        public static final int ENDNOTE
        The object is an endnote.