PdfPageLayout

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

FieldDescription
ONE_COLUMNDisplay the pages in one column.
SINGLE_PAGEDisplay one page at a time.
TWO_COLUMN_LEFTDisplay the pages in two columns, with odd-numbered pages on the left.
TWO_COLUMN_RIGHTDisplay the pages in two columns, with odd-numbered pages on the right.
TWO_PAGE_LEFTDisplay the pages two at a time, with odd-numbered pages on the left.
TWO_PAGE_RIGHTDisplay the pages two at a time, with odd-numbered pages on the right.
length

Methods

MethodDescription
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:

ParameterTypeDescription
pdfPageLayoutNamejava.lang.String

Returns: int

getName(int pdfPageLayout)

public static String getName(int pdfPageLayout)

Parameters:

ParameterTypeDescription
pdfPageLayoutint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int pdfPageLayout)

public static String toString(int pdfPageLayout)

Parameters:

ParameterTypeDescription
pdfPageLayoutint

Returns: java.lang.String