com.aspose.words
Class PaperTray

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

public class PaperTray 
extends java.lang.Object

Utility class containing constants. Specifies the paper tray (bin) where the printer needs to take the paper from.

Example:

Creates headers and footers different for first, even and odd pages using DocumentBuilder.
DocumentBuilder builder = new DocumentBuilder();

PageSetup ps = builder.getPageSetup();
ps.setDifferentFirstPageHeaderFooter(true);
ps.setOddAndEvenPagesHeaderFooter(true);
ps.setFirstPageTray(PaperTray.ENVELOPE_FEED);
ps.setOtherPagesTray(PaperTray.FORM_SOURCE);

builder.moveToHeaderFooter(HeaderFooterType.HEADER_FIRST);
builder.writeln("First page header.");

builder.moveToHeaderFooter(HeaderFooterType.HEADER_EVEN);
builder.writeln("Even pages header.");

builder.moveToHeaderFooter(HeaderFooterType.HEADER_PRIMARY);
builder.writeln("Odd pages header.");

// Move back to the main story of the first section.
builder.moveToSection(0);
builder.writeln("Text page 1.");
builder.insertBreak(BreakType.PAGE_BREAK);
builder.writeln("Text page 2.");
builder.insertBreak(BreakType.PAGE_BREAK);
builder.writeln("Text page 3.");

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

Field Summary
static final intAUTOMATIC_SHEET_FEED
           Automatically fed paper.
static final intDEFAULT_BIN
           The printer's default input bin.
static final intENVELOPE_FEED
           An envelope.
static final intFORM_SOURCE
          
static final intLARGE_CAPACITY_BIN
           The printer's large-capacity bin.
static final intLARGE_FORMAT_BIN
           Large-format paper.
static final intLOWER_BIN
           The lower bin of a printer.
static final intMANUAL_ENVELOPE_FEED
           Manually fed envelope.
static final intMANUAL_FEED
           Manually fed paper.
static final intMIDDLE_BIN
           The middle bin of a printer.
static final intPAPER_CASSETTE
           A paper cassette.
static final intSMALL_FORMAT_BIN
           Small-format paper.
static final intTRACTOR_FEED
           A tractor feed.
static final intUPPER_BIN
           The upper bin of a printer (or, if the printer only has one bin, that bin).
 

Field Detail

AUTOMATIC_SHEET_FEED

public static final int AUTOMATIC_SHEET_FEED
Automatically fed paper.

DEFAULT_BIN

public static final int DEFAULT_BIN
The printer's default input bin.

ENVELOPE_FEED

public static final int ENVELOPE_FEED
An envelope.

FORM_SOURCE

public static final int FORM_SOURCE

LARGE_CAPACITY_BIN

public static final int LARGE_CAPACITY_BIN
The printer's large-capacity bin.

LARGE_FORMAT_BIN

public static final int LARGE_FORMAT_BIN
Large-format paper.

LOWER_BIN

public static final int LOWER_BIN
The lower bin of a printer.

MANUAL_ENVELOPE_FEED

public static final int MANUAL_ENVELOPE_FEED
Manually fed envelope.

MANUAL_FEED

public static final int MANUAL_FEED
Manually fed paper.

MIDDLE_BIN

public static final int MIDDLE_BIN
The middle bin of a printer.

PAPER_CASSETTE

public static final int PAPER_CASSETTE
A paper cassette.

SMALL_FORMAT_BIN

public static final int SMALL_FORMAT_BIN
Small-format paper.

TRACTOR_FEED

public static final int TRACTOR_FEED
A tractor feed.

UPPER_BIN

public static final int UPPER_BIN
The upper bin of a printer (or, if the printer only has one bin, that bin).

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