我正在创建一个word文档
using (WordprocessingDocument myDoc = WordprocessingDocument.Create(@"c:\generate\export.docx", WordprocessingDocumentType.Document))
{
MainDocumentPart mainPart = myDoc.AddMainDocumentPart();
mainPart.Document = new Document();
var body = new Body();
var p = new Paragraph(
new ParagraphProperties(
new Justification()
{
Val = JustificationValues.Center
}
),
new Run(new Text("test"))
);
body.Append(p);
mainPart.Document.Append(body);
// Save changes to the main document part.
mainPart.Document.Save();
}
如何将页面方向设置为横向?