java.lang.Object
com.aspose.words.MultiplePagesType
public class MultiplePagesType
- extends java.lang.Object
Utility class containing constants.
Specifies how document is printed out.
Example:
Shows how to configure a document that can be printed as a book fold.
Document doc = new Document();
// Insert text that spans 16 pages.
DocumentBuilder builder = new DocumentBuilder(doc);
builder.writeln("My Booklet:");
for (int i = 0; i < 15; i++) {
builder.insertBreak(BreakType.PAGE_BREAK);
builder.write(MessageFormat.format("Booklet face #{0}", i));
}
// Configure the first section's "PageSetup" property to print the document in the form of a book fold.
// When we print this document on both sides, we can take the pages to stack them
// and fold them all down the middle at once. The contents of the document will line up into a book fold.
PageSetup pageSetup = doc.getSections().get(0).getPageSetup();
pageSetup.setMultiplePages(MultiplePagesType.BOOK_FOLD_PRINTING);
// We can only specify the number of sheets in multiples of 4.
pageSetup.setSheetsPerBooklet(4);
doc.save(getArtifactsDir() + "PageSetup.Booklet.docx");
|
Field Summary |
static final int | NORMAL = 0 | |
|
Normal printing, no multiple pages specified.
|
static final int | MIRROR_MARGINS = 1 | |
|
Swaps left and right margins on facing pages.
|
static final int | TWO_PAGES_PER_SHEET = 2 | |
|
Prints two pages per sheet.
|
static final int | BOOK_FOLD_PRINTING = 3 | |
|
Specifies whether to print the document as a book fold.
|
static final int | BOOK_FOLD_PRINTING_REVERSE = 4 | |
|
Specifies whether to print the document as a reverse book fold.
|
static final int | DEFAULT = 0 | |
|
Default value is NORMAL |
NORMAL = 0 | |
public static final int NORMAL |
-
Normal printing, no multiple pages specified.
MIRROR_MARGINS = 1 | |
public static final int MIRROR_MARGINS |
-
Swaps left and right margins on facing pages.
TWO_PAGES_PER_SHEET = 2 | |
public static final int TWO_PAGES_PER_SHEET |
-
Prints two pages per sheet.
BOOK_FOLD_PRINTING = 3 | |
public static final int BOOK_FOLD_PRINTING |
-
Specifies whether to print the document as a book fold.
BOOK_FOLD_PRINTING_REVERSE = 4 | |
public static final int BOOK_FOLD_PRINTING_REVERSE |
-
Specifies whether to print the document as a reverse book fold.
DEFAULT = 0 | |
public static final int DEFAULT |
-
Default value is NORMAL
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.