PageSize

Inheritance: java.lang.Object, com.aspose.pdf.PageSize

public final class PageSize extends Object

Class representing size of page in PDF document.

Fields

FieldDescription
LEAVE_INTACTFor internal usage only

Constructors

ConstructorDescription
PageSizeConstructor for PageSize.

Methods

MethodDescription
getA0A0 size (1189x840 mm).
getA1A1 size (840x594 mm).
getA2A2 size (594x420 mm).
getA3A3 size (420x297 mm).
getA4A4 size (297x210 mm).
getA5A5 size (210x148 mm).
getA6A6 size (148x105 mm).
getB5B5 size (250x176 mm).
getHeightGets page height.
getP11x1711x17 inches format.
getPageLedgerLedger size (432x279 mm).
getPageLegalLegal size (356x216 mm).
getPageLetterLetter size (279x216 mm).
getWidthGets page width.
isLandscapeGets page orientation. Returns true of this is landscape orientation and false if this is portrait.
setHeightSets page height.
setLandscapeSets page orientation. Returns true of this is landscape orientation and false if this is portrait.
setWidthSets page width.

LEAVE_INTACT

public static final float LEAVE_INTACT

For internal usage only

PageSize

public PageSize(float x, float y)

Constructor for PageSize.

Parameters:

ParameterTypeDescription
xWidth of the page.
yHeight of the page.

getA0

public static PageSize getA0()

A0 size (1189x840 mm).

Returns: PageSize object

getA1

public static PageSize getA1()

A1 size (840x594 mm).

Returns: PageSize object

getA2

public static PageSize getA2()

A2 size (594x420 mm).

Returns: PageSize object

getA3

public static PageSize getA3()

A3 size (420x297 mm).

Returns: PageSize object

getA4

public static PageSize getA4()

A4 size (297x210 mm).

Returns: PageSize object

getA5

public static PageSize getA5()

A5 size (210x148 mm).

Returns: PageSize object

getA6

public static PageSize getA6()

A6 size (148x105 mm).

Returns: PageSize object

getB5

public static PageSize getB5()

B5 size (250x176 mm).

Returns: PageSize object

getHeight

public float getHeight()

Gets page height.

Returns: page height.

getP11x17

public static PageSize getP11x17()

11x17 inches format.

Returns: PageSize object

getPageLedger

public static PageSize getPageLedger()

Ledger size (432x279 mm).

Returns: PageSize object

getPageLegal

public static PageSize getPageLegal()

Legal size (356x216 mm).

Returns: PageSize object

getPageLetter

public static PageSize getPageLetter()

Letter size (279x216 mm).

Returns: PageSize object

getWidth

public float getWidth()

Gets page width.

Returns: page width.

isLandscape

public boolean isLandscape()

Gets page orientation. Returns true of this is landscape orientation and false if this is portrait.

Returns: boolean value

setHeight

public void setHeight(float value)

Sets page height.

Parameters:

ParameterTypeDescription
valuepage height.

setLandscape

public void setLandscape(boolean value)

Sets page orientation. Returns true of this is landscape orientation and false if this is portrait.

Parameters:

ParameterTypeDescription
valueboolean value

setWidth

public void setWidth(float value)

Sets page width.

Parameters:

ParameterTypeDescription
valuepage width.