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 |
-
DEFAULT_BIN | |
public static final int DEFAULT_BIN |
-
ENVELOPE_FEED | |
public static final int ENVELOPE_FEED |
-
FORM_SOURCE | |
public static final int FORM_SOURCE |
-
LARGE_CAPACITY_BIN | |
public static final int LARGE_CAPACITY_BIN |
-
LARGE_FORMAT_BIN | |
public static final int LARGE_FORMAT_BIN |
-
LOWER_BIN | |
public static final int LOWER_BIN |
-
MANUAL_ENVELOPE_FEED | |
public static final int MANUAL_ENVELOPE_FEED |
-
MANUAL_FEED | |
public static final int MANUAL_FEED |
-
MIDDLE_BIN | |
public static final int MIDDLE_BIN |
-
ONLY_BIN | |
public static final int ONLY_BIN |
-
PAPER_CASSETTE | |
public static final int PAPER_CASSETTE |
-
SMALL_FORMAT_BIN | |
public static final int SMALL_FORMAT_BIN |
-
TRACTOR_FEED | |
public static final int TRACTOR_FEED |
-
UPPER_BIN | |
public static final int UPPER_BIN |
-
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.