java.lang.Object
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");
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.