com.aspose.words
Class Orientation

java.lang.Object
    extended by com.aspose.words.Orientation

public class Orientation 
extends java.lang.Object

Utility class containing constants. Specifies page orientation.

Example:

Shows how to insert sections using DocumentBuilder, specify page setup for a section and reset page setup to defaults.
DocumentBuilder builder = new DocumentBuilder();

// Modify the first section in the document.
builder.getPageSetup().setOrientation(Orientation.LANDSCAPE);
builder.getPageSetup().setVerticalAlignment(PageVerticalAlignment.CENTER);
builder.writeln("Section 1, landscape oriented and text vertically centered.");

// Start a new section and reset its formatting to defaults.
builder.insertBreak(BreakType.SECTION_BREAK_NEW_PAGE);
builder.getPageSetup().clearFormatting();
builder.writeln("Section 2, back to default Letter paper size, portrait orientation and top alignment.");

builder.getDocument().save(getMyDir() + "PageSetup.ClearFormatting Out.doc");

Field Summary
static final intPORTRAIT = 1
           Portrait page orientation (narrow and tall).
static final intLANDSCAPE = 2
           Landscape page orientation (wide and short).
 

Field Detail

PORTRAIT = 1

public static final int PORTRAIT
Portrait page orientation (narrow and tall).

LANDSCAPE = 2

public static final int LANDSCAPE
Landscape page orientation (wide and short).

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.