本文整理汇总了C#中DocumentBuilder.InsertFootnote方法的典型用法代码示例。如果您正苦于以下问题:C# DocumentBuilder.InsertFootnote方法的具体用法?C# DocumentBuilder.InsertFootnote怎么用?C# DocumentBuilder.InsertFootnote使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DocumentBuilder
的用法示例。
在下文中一共展示了DocumentBuilder.InsertFootnote方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FootnoteOptionsEx
public void FootnoteOptionsEx()
{
//ExStart
//ExFor:Document.FootnoteOptions
//ExSummary:Shows how to insert a footnote and apply footnote options.
Aspose.Words.Document doc = new Aspose.Words.Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.InsertFootnote(FootnoteType.Footnote, "My Footnote.");
// Change your document's footnote options.
doc.FootnoteOptions.Location = FootnoteLocation.BottomOfPage;
doc.FootnoteOptions.NumberStyle = NumberStyle.Arabic;
doc.FootnoteOptions.StartNumber = 1;
doc.Save(MyDir + "Document.FootnoteOptions.doc");
//ExEnd
}
示例2: AddFootnoteWithCustomMarks
public void AddFootnoteWithCustomMarks()
{
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Write("Some text");
Footnote foot = new Footnote(doc, FootnoteType.Footnote);
foot.ReferenceMark = "242";
builder.InsertFootnote(FootnoteType.Footnote, "Footnote text.", foot.ReferenceMark);
MemoryStream dstStream = new MemoryStream();
doc.Save(dstStream, SaveFormat.Docx);
doc = new Document(dstStream);
foot = (Footnote)doc.GetChildNodes(NodeType.Footnote, true)[0];
Assert.IsFalse(foot.IsAuto);
Assert.AreEqual("242", foot.ReferenceMark);
Assert.AreEqual("242 Footnote text.\r", foot.GetText());
}
示例3: InsertFootnote
public void InsertFootnote()
{
//ExStart
//ExFor:Footnote
//ExFor:FootnoteType
//ExFor:DocumentBuilder.InsertFootnote(FootnoteType,string)
//ExSummary:Shows how to add a footnote to a paragraph in the document using DocumentBuilder.
Aspose.Words.Document doc = new Aspose.Words.Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Write("Some text");
builder.InsertFootnote(FootnoteType.Footnote, "Footnote text.");
//ExEnd
Assert.AreEqual("Footnote text.", doc.GetChildNodes(NodeType.Footnote, true)[0].ToString(SaveFormat.Text).Trim());
}
示例4: FootnoteOptionsEx
public void FootnoteOptionsEx()
{
//ExStart
//ExFor:Document.FootnoteOptions
//ExId:FootnoteOptionsEx
//ExSummary:Shows how to edit a document's footnote options.
Aspose.Words.Document doc = new Aspose.Words.Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.InsertFootnote(FootnoteType.Footnote, "My Footnote.");
// Change your document's footnote options.
doc.FootnoteOptions.Location = FootnoteLocation.BeneathText;
doc.FootnoteOptions.NumberStyle = NumberStyle.Arabic;
doc.FootnoteOptions.StartNumber = 1;
doc.Save(ExDir + "Document.FootnoteOptions.doc");
//ExEnd
}