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 PageSizeA02384 x 3370 pointsstatic PageSizeA11684 x 2384 pointsstatic PageSizeA1074 x 105 pointsstatic PageSizeA21190 x 1684 pointsstatic PageSizeA3842 x 1190 points.static PageSizeA4595 x 842 points.static PageSizeA5421 x 595 points.static PageSizeA6297 x 421 pointsstatic PageSizeA7210 x 297 pointsstatic PageSizeA8148 x 210 pointsstatic PageSizeA9105 x 148 pointsstatic PageSizeArchA648 x 864 pointsstatic PageSizeArchB864 x 1296 pointsstatic PageSizeArchC1296 x 1728 pointsstatic PageSizeArchD1728 x 2592 pointsstatic PageSizeArchE2592 x 3456 pointsstatic PageSizeArchE12160 x 3024 pointsstatic PageSizeB4This matches the standard, ISO dimensions: 250mm x 353mm.static PageSizeB5This matches the standard, ISO dimensions: 176mm x 250mm.static PageSizeHALFLETTER396 x 612 pointsfloatheightheight in typographic pointsstatic PageSizeISOB02836 x 4008 pointsstatic PageSizeISOB12004 x 2836 pointsstatic PageSizeISOB21418 x 2004 pointsstatic PageSizeISOB31002 x 1418 pointsstatic PageSizeISOB4709 x 1002 pointsstatic PageSizeISOB5501 x 709 pointsstatic PageSizeJIS_B4This correspond to the JIS standard dimensions: 257mm x 364mm.static PageSizeJIS_B5This correspond to the JIS standard dimensions: 182mm x 257mm.static PageSizeLEDGER1224 x 792 points.static PageSizeLEGAL612 x 1008 points.static PageSizeLETTER612 x 792 points.static PageSizeNOTE540 x 720 pointsbooleanrotatedlandscape orientation flagstatic PageSizeTABLOID792 x 1224 pointsfloatwidthwiths 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 PageSizegetInstance(java.lang.String name)floatmmHeight()floatmmWidth()PageSizerotate()java.lang.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
getInstance
public static PageSize getInstance(java.lang.String name) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException
- Throws:
java.lang.IllegalArgumentExceptionjava.lang.IllegalAccessException
-
-