Как изменить ориентацию страницы с C# с помощью open xml sdk

Я создаю документ 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();
}

Как установить альбомную ориентацию страницы?

6
задан EstevaoLuis 30 July 2019 в 13:36
поделиться