PdfPageLayout
Contents
[
Hide
]Inheritance: java.lang.Object
public class PdfPageLayout
Specifies the page layout to be used when the document is opened in a PDF reader.
Examples:
Shows how to display pages when opened in a PDF reader.
Document doc = new Document(getMyDir() + "Big document.docx");
// Display the pages two at a time, with odd-numbered pages on the left.
PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.setPageLayout(PdfPageLayout.TWO_PAGE_LEFT);
doc.save(getArtifactsDir() + "PdfSaveOptions.PageLayout.pdf", saveOptions);
Fields
Field | Description |
---|---|
ONE_COLUMN | Display the pages in one column. |
SINGLE_PAGE | Display one page at a time. |
TWO_COLUMN_LEFT | Display the pages in two columns, with odd-numbered pages on the left. |
TWO_COLUMN_RIGHT | Display the pages in two columns, with odd-numbered pages on the right. |
TWO_PAGE_LEFT | Display the pages two at a time, with odd-numbered pages on the left. |
TWO_PAGE_RIGHT | Display the pages two at a time, with odd-numbered pages on the right. |
length |
Methods
Method | Description |
---|---|
fromName(String pdfPageLayoutName) | |
getName(int pdfPageLayout) | |
getValues() | |
toString(int pdfPageLayout) |
ONE_COLUMN
public static int ONE_COLUMN
Display the pages in one column.
SINGLE_PAGE
public static int SINGLE_PAGE
Display one page at a time.
TWO_COLUMN_LEFT
public static int TWO_COLUMN_LEFT
Display the pages in two columns, with odd-numbered pages on the left.
TWO_COLUMN_RIGHT
public static int TWO_COLUMN_RIGHT
Display the pages in two columns, with odd-numbered pages on the right.
TWO_PAGE_LEFT
public static int TWO_PAGE_LEFT
Display the pages two at a time, with odd-numbered pages on the left.
TWO_PAGE_RIGHT
public static int TWO_PAGE_RIGHT
Display the pages two at a time, with odd-numbered pages on the right.
length
public static int length
fromName(String pdfPageLayoutName)
public static int fromName(String pdfPageLayoutName)
Parameters:
Parameter | Type | Description |
---|---|---|
pdfPageLayoutName | java.lang.String |
Returns: int
getName(int pdfPageLayout)
public static String getName(int pdfPageLayout)
Parameters:
Parameter | Type | Description |
---|---|---|
pdfPageLayout | int |
Returns: java.lang.String
getValues()
public static int[] getValues()
Returns: int[]
toString(int pdfPageLayout)
public static String toString(int pdfPageLayout)
Parameters:
Parameter | Type | Description |
---|---|---|
pdfPageLayout | int |
Returns: java.lang.String