FootnoteOptions Class

Represents the footnote numbering options for a document or section.

Inheritance Hierarchy

SystemObject
  Aspose.WordsFootnoteOptions

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.7.0

Syntax

public sealed class FootnoteOptions

The FootnoteOptions type exposes the following members.

Properties

  NameDescription
Public propertyCode exampleColumns
Specifies the number of columns with which the footnotes area is formatted.
Public propertyCode exampleNumberStyle
Specifies the number format for automatically numbered footnotes.
Public propertyCode examplePosition
Specifies the footnotes position.
Public propertyCode exampleRestartRule
Determines when automatic numbering restarts.
Public propertyCode exampleStartNumber
Specifies the starting number or character for the first automatically numbered footnotes.

Methods

  NameDescription
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)

Examples

Shows how to set the number of columns with which the footnotes area is formatted.
Document doc = new Document(MyDir + "Footnotes and endnotes.docx");

// Let's change number of columns for footnotes on page. If columns value is 0 than footnotes area
// is formatted with a number of columns based on the number of columns on the displayed page
doc.FootnoteOptions.Columns = 2;
doc.Save(ArtifactsDir + "Document.FootnoteColumns.docx");
Shows how to insert footnotes and edit their appearance.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Insert 3 paragraphs with a footnote at the end of each one
builder.Write("Text 1. ");
builder.InsertFootnote(FootnoteType.Footnote, "Footnote 1");
builder.InsertBreak(BreakType.PageBreak);
builder.Write("Text 2. ");
builder.InsertFootnote(FootnoteType.Footnote, "Footnote 2");
builder.Write("Text 3. ");
builder.InsertFootnote(FootnoteType.Footnote, "Footnote 3", "Custom reference mark");

// Edit the numbering and positioning of footnotes 
doc.FootnoteOptions.Position = FootnotePosition.BeneathText;
doc.FootnoteOptions.NumberStyle = NumberStyle.UppercaseRoman;
doc.FootnoteOptions.RestartRule = FootnoteNumberingRule.Continuous;
doc.FootnoteOptions.StartNumber = 1;

doc.Save(ArtifactsDir + "Document.Footnotes.docx");

See Also