Package com.pd4ml
Class PageSize
- java.lang.Object
-
- com.pd4ml.PageSize
-
- All Implemented Interfaces:
Dimensions
public class PageSize extends java.lang.Object implements Dimensions
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.pd4ml.Dimensions
Dimensions.Units
-
-
Field Summary
Fields Modifier and Type Field Description static PageSize
A0
2384 x 3370 pointsstatic PageSize
A1
1684 x 2384 pointsstatic PageSize
A10
74 x 105 pointsstatic PageSize
A2
1190 x 1684 pointsstatic PageSize
A3
842 x 1190 points.static PageSize
A4
595 x 842 points.static PageSize
A5
421 x 595 points.static PageSize
A6
297 x 421 pointsstatic PageSize
A7
210 x 297 pointsstatic PageSize
A8
148 x 210 pointsstatic PageSize
A9
105 x 148 pointsstatic PageSize
ArchA
648 x 864 pointsstatic PageSize
ArchB
864 x 1296 pointsstatic PageSize
ArchC
1296 x 1728 pointsstatic PageSize
ArchD
1728 x 2592 pointsstatic PageSize
ArchE
2592 x 3456 pointsstatic PageSize
ArchE1
2160 x 3024 pointsstatic PageSize
B4
This matches the standard, ISO dimensions: 250mm x 353mm.static PageSize
B5
This matches the standard, ISO dimensions: 176mm x 250mm.static PageSize
HALFLETTER
396 x 612 pointsfloat
height
height in typographic pointsstatic PageSize
ISOB0
2836 x 4008 pointsstatic PageSize
ISOB1
2004 x 2836 pointsstatic PageSize
ISOB2
1418 x 2004 pointsstatic PageSize
ISOB3
1002 x 1418 pointsstatic PageSize
ISOB4
709 x 1002 pointsstatic PageSize
ISOB5
501 x 709 pointsstatic PageSize
JIS_B4
This correspond to the JIS standard dimensions: 257mm x 364mm.static PageSize
JIS_B5
This correspond to the JIS standard dimensions: 182mm x 257mm.static PageSize
LEDGER
1224 x 792 points.static PageSize
LEGAL
612 x 1008 points.static PageSize
LETTER
612 x 792 points.static PageSize
NOTE
540 x 720 pointsboolean
rotated
landscape orientation flagstatic PageSize
TABLOID
792 x 1224 pointsfloat
width
withs in typographic points-
Fields inherited from interface com.pd4ml.Dimensions
MM_PER_INCH, PIXELS_PER_POINT, POINTS_PER_INCH, POINTS_PER_MM
-
-
Constructor Summary
Constructors Constructor Description PageSize(float width, float height)
creates an instance of page size objectPageSize(float width, float height, Dimensions.Units units)
creates an instance of page size object in given dimension units
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PageSize
getInstance(java.lang.String name)
float
mmHeight()
float
mmWidth()
PageSize
rotate()
java.lang.String
toString()
-
-
-
Field Detail
-
B5
public static final PageSize B5
This matches the standard, ISO dimensions: 176mm x 250mm.
-
B4
public static final PageSize B4
This matches the standard, ISO dimensions: 250mm x 353mm.
-
JIS_B5
public static final PageSize JIS_B5
This correspond to the JIS standard dimensions: 182mm x 257mm.
-
JIS_B4
public static final PageSize JIS_B4
This correspond to the JIS standard dimensions: 257mm x 364mm.
-
A10
public static final PageSize A10
74 x 105 points
-
A9
public static final PageSize A9
105 x 148 points
-
A8
public static final PageSize A8
148 x 210 points
-
A7
public static final PageSize A7
210 x 297 points
-
A6
public static final PageSize A6
297 x 421 points
-
A5
public static final PageSize A5
421 x 595 points. This matches the standard, ISO dimensions: 148mm x 210mm.
-
A4
public static final PageSize A4
595 x 842 points. This matches the standard, ISO dimensions: 210mm x 297mm. (most frequently used dimensions for personal printing.
-
A3
public static final PageSize A3
842 x 1190 points. This matches the standard, ISO dimensions: 297mm x 420mm.
-
A2
public static final PageSize A2
1190 x 1684 points
-
A1
public static final PageSize A1
1684 x 2384 points
-
A0
public static final PageSize A0
2384 x 3370 points
-
ISOB5
public static final PageSize ISOB5
501 x 709 points
-
ISOB4
public static final PageSize ISOB4
709 x 1002 points
-
ISOB3
public static final PageSize ISOB3
1002 x 1418 points
-
ISOB2
public static final PageSize ISOB2
1418 x 2004 points
-
ISOB1
public static final PageSize ISOB1
2004 x 2836 points
-
ISOB0
public static final PageSize ISOB0
2836 x 4008 points
-
HALFLETTER
public static final PageSize HALFLETTER
396 x 612 points
-
LETTER
public static final PageSize LETTER
612 x 792 points. This keyword is a equivalent to the dimensions of letter paper in North America i.e. 8.5in x 11in.
-
TABLOID
public static final PageSize TABLOID
792 x 1224 points
-
LEDGER
public static final PageSize LEDGER
1224 x 792 points. This keyword is a equivalent to the dimensions of ledger pages in North America i.e. 11in x 17in.
-
NOTE
public static final PageSize NOTE
540 x 720 points
-
LEGAL
public static final PageSize LEGAL
612 x 1008 points. This keyword is a equivalent to the dimensions of legal papers in North America i.e. 8.5in x 14in.
-
ArchA
public static final PageSize ArchA
648 x 864 points
-
ArchB
public static final PageSize ArchB
864 x 1296 points
-
ArchC
public static final PageSize ArchC
1296 x 1728 points
-
ArchD
public static final PageSize ArchD
1728 x 2592 points
-
ArchE
public static final PageSize ArchE
2592 x 3456 points
-
ArchE1
public static final PageSize ArchE1
2160 x 3024 points
-
width
public float width
withs in typographic points
-
height
public float height
height in typographic points
-
rotated
public boolean rotated
landscape orientation flag
-
-
Constructor Detail
-
PageSize
public PageSize(float width, float height, Dimensions.Units units)
creates an instance of page size object in given dimension units- Parameters:
width
- in typographic pointsheight
- in typographic pointsunits
- typographic points, millimeters or screen pixels (assuming 72dpi conversion factor)
-
PageSize
public PageSize(float width, float height)
creates an instance of page size object- Parameters:
width
- in typographic pointsheight
- in typographic points
-
-
Method Detail
-
rotate
public PageSize rotate()
- Returns:
- 90deg rotated copy of the dimensions
-
mmWidth
public float mmWidth()
- Returns:
- width converted to millimeters
-
mmHeight
public float mmHeight()
- Returns:
- height converted to millimeters
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getInstance
public static PageSize getInstance(java.lang.String name) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException
- Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
-
-