public class PageSize
extends java.lang.Object
Class that represents a page with a specified origin and size. The class is immutable and can be initialized with coordinates and dimensions or only dimensions:
PageSize a3 = new PageSize(0.0, 0.0, 297.0, 420.0); PageSize a4 = new PageSize(210.0, 297.0);
For convenience the class contains static constants for common page sizes:
PageSize a4 = PageSize.A4; PageSize letter = PageSize.LETTER;
| Modifier and Type | Field and Description |
|---|---|
static PageSize |
A3 |
static PageSize |
A4 |
static PageSize |
A5 |
static PageSize |
LEDGER |
static PageSize |
LEGAL |
static PageSize |
LETTER |
static PageSize |
TABLOID |
| Constructor and Description |
|---|
PageSize(double width,
double height) |
PageSize(double x,
double y,
double width,
double height) |
PageSize(java.awt.geom.Rectangle2D size) |
| Modifier and Type | Method and Description |
|---|---|
double |
getHeight() |
PageSize |
getLandscape() |
PageSize |
getPortrait() |
double |
getWidth() |
double |
getX() |
double |
getY() |
public static final PageSize A3
public static final PageSize A4
public static final PageSize A5
public static final PageSize LETTER
public static final PageSize LEGAL
public static final PageSize TABLOID
public static final PageSize LEDGER