The document is getting created in Portrait mode only even we have these line of codes
var coverPageSection = coverPageMigraDoc.AddSection();
if (coverPageSection.Document?.DefaultPageSetup != null)
{
coverPageSection.PageSetup = coverPageSection.Document.DefaultPageSetup.Clone();
}
else
{
coverPageSection.PageSetup = new PageSetup();
}
coverPageSection.PageSetup.Orientation = Orientation.Landscape;