当前位置: 首页>>代码示例>>C#>>正文


C# DocumentBuilder.InsertFootnote方法代码示例

本文整理汇总了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
        }
开发者ID:animaal,项目名称:Aspose_Words_NET,代码行数:18,代码来源:ExDocument.cs

示例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());
        }
开发者ID:aspose-words,项目名称:Aspose.Words-for-.NET,代码行数:22,代码来源:ExDocumentBuilder.cs

示例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());
        }
开发者ID:joyang1,项目名称:Aspose_Words_NET,代码行数:16,代码来源:ExDocumentBuilder.cs

示例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
        }
开发者ID:joyang1,项目名称:Aspose_Words_NET,代码行数:19,代码来源:ExDocument.cs


注:本文中的DocumentBuilder.InsertFootnote方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。