Skip to main content

Перечисление PageOrientation

Перечисление PageOrientation содержит варианты ориентации страницы документа. Может быть использована для получения / установки ориентации страниц для секции или документа в методах Section.setPageOrientation(), Section.getPageOrientation().

ЗначениеОписание
PageOrientation.LandscapeАльбомная ориентация
PageOrientation.PortraitКнижная ориентация

Примеры​


Block block = document.getBlocks().getBlock(0);
if (block != null)
{
Section section = block.getSection();
section.setPageOrientation(PageOrientation.Portrait);
Console.WriteLine(section.getPageOrientation());
}

Sections sections = document.getSections();
SectionsEnumerator sectionsEnumerator = sections.GetEnumerator();

foreach (var section in sectionsEnumerator)
{
section.setPageOrientation(PageOrientation.Portrait);
Console.WriteLine(section.getPageOrientation());
}