Class Orientation

  • java.lang.Object
    • com.aspose.words.Orientation
public class Orientation 
extends java.lang.Object

Utility class containing constants. Specifies page orientation.


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

// Modify the first section in the document
builder.writeln("Section 1, landscape oriented and text vertically centered.");

// Start a new section and reset its formatting to defaults
builder.writeln("Section 2, back to default Letter paper size, portrait orientation and top alignment."); + "PageSetup.ClearFormatting.docx");

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).