Package com.pd4ml

Class PageSize

  • All Implemented Interfaces:
    Dimensions

    public class PageSize
    extends java.lang.Object
    implements Dimensions
    • 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 points
        height - in typographic points
        units - 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 points
        height - 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 class java.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