如何转到Novacode Docx的下一页

时间:2016-02-01 06:40:55

标签: c# novacode-docx

我在C#中使用Novacode DocX。使用方法sudo service mongod restart 。但它不保存默认页面的参数。例如,页面应采用横向格式。使用InsertSectionPageBreak()时,格式会更改为图书。我需要每个表都在横向格式的每个页面上。

InsertSectionPageBreak()

1 个答案:

答案 0 :(得分:8)

不使用InsertSectionPageBreak类的DocX方法,而是使用InsertPageBreakAfterSelf类的Table

doc.InsertTable(table).InsertPageBreakAfterSelf();

它应该保留上一页的风格。