【问题标题】:How can we set page margins for word document using aspose.words in .Net我们如何在 .Net 中使用 aspose.words 为 word 文档设置页边距
【发布时间】:2017-01-19 13:07:43
【问题描述】:

我在 .Net 中使用 Aspose.Words,我需要使用 Aspose.Words 设置每一侧的页边距、页面方向和页眉页脚距离?

【问题讨论】:

    标签: aspose aspose.words


    【解决方案1】:

    您可以通过不同的方式为 Word 文档设置页边距。但以下是最简单的方法:

                Document() doc = new Document();
    
                DocumentBuilder(doc) builder = new DocumentBuilder(doc)
                {
                    PageSetup =
                    {
                        Orientation = Word.Orientation.Portrait,
                        PaperSize = Word.PaperSize.Letter,
                        LeftMargin = 72.0,
                        RightMargin = 72.0,
                        TopMargin = 72.0,
                        BottomMargin = 72.0
                    },
    
                };
    

    【讨论】:

      猜你喜欢
      • 2014-08-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-09-23
      • 1970-01-01
      • 1970-01-01
      • 2020-04-14
      • 1970-01-01
      相关资源
      最近更新 更多