1
我在.Net中使用Aspose.Words,我需要使用Aspose.Words设置页面边距,页面方向和页眉页脚距离?我们如何在.Net中使用aspose.words设置word文档的页边距使用.net
我在.Net中使用Aspose.Words,我需要使用Aspose.Words设置页面边距,页面方向和页眉页脚距离?我们如何在.Net中使用aspose.words设置word文档的页边距使用.net
您可以用不同方式设置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
},
};
不错,它工作正常。谢谢 –