Class Paper

java.lang.Object
javafx.print.Paper

public final class Paper extends Object
A class which encapsulates the size of paper media as used by printers.

The paper sizes which are enumerated for a printer is the authoritative source of Paper sizes that may be selected for printing on that printer.

However for convenience, this class pre-defines some of the most common paper sizes so that an application may easily set up default parameters from code, eg by referring to Paper.A4

Since:
JavaFX 8.0
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    static final Paper
    Specifies the ISO A0 size, 841 mm by 1189 mm.
    static final Paper
    Specifies the ISO A1 size, 594 mm by 841 mm.
    static final Paper
    Specifies the ISO A2 size, 420 mm by 594 mm.
    static final Paper
    Specifies the ISO A3 size, 297 mm by 420 mm.
    static final Paper
    Specifies the ISO A4 size, 210 mm by 297 mm.
    static final Paper
    Specifies the ISO A5 size, 148 mm by 210 mm.
    static final Paper
    Specifies the ISO A6 size, 105 mm by 148 mm.
    static final Paper
    Specifies the engineering C size, 17 inch by 22 inch.
    static final Paper
    Specifies the ISO Designated Long size, 110 mm by 220 mm.
    static final Paper
    Specifies the executive size, 7.25 inches by 10.5 inches.
    static final Paper
    Specifies the Japanese postcard size, 100 mm by 148 mm.
    static final Paper
    Specifies the JIS B4 size, 257 mm by 364 mm.
    static final Paper
    Specifies the JIS B5 size, 182 mm by 257 mm.
    static final Paper
    Specifies the JIS B6 size, 128 mm by 182 mm.
    static final Paper
    Specifies the North American legal size, 8.5 inches by 14 inches.
    static final Paper
    Specifies the Monarch envelope size, 3.875 inches by 7.5 inches.
    static final Paper
    Specifies the North American 8 inch by 10 inch paper.
    static final Paper
    Specifies the North American letter size, 8.5 inches by 11 inches
    static final Paper
    Specifies the North American Number 10 business envelope size, 4.125 inches by 9.5 inches.
    static final Paper
    Specifies the tabloid size, 11 inches by 17 inches.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    final boolean
     
    final double
    Get the height of the paper in points (1/72 inch)
    final String
    Get the paper name.
    final double
    Get the width of the paper in points (1/72 inch)
    final int
     
    final String
     

    Methods declared in class java.lang.Object Link icon

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details Link icon

    • A0 Link icon

      public static final Paper A0
      Specifies the ISO A0 size, 841 mm by 1189 mm.
    • A1 Link icon

      public static final Paper A1
      Specifies the ISO A1 size, 594 mm by 841 mm.
    • A2 Link icon

      public static final Paper A2
      Specifies the ISO A2 size, 420 mm by 594 mm.
    • A3 Link icon

      public static final Paper A3
      Specifies the ISO A3 size, 297 mm by 420 mm.
    • A4 Link icon

      public static final Paper A4
      Specifies the ISO A4 size, 210 mm by 297 mm.
    • A5 Link icon

      public static final Paper A5
      Specifies the ISO A5 size, 148 mm by 210 mm.
    • A6 Link icon

      public static final Paper A6
      Specifies the ISO A6 size, 105 mm by 148 mm.
    • DESIGNATED_LONG Link icon

      public static final Paper DESIGNATED_LONG
      Specifies the ISO Designated Long size, 110 mm by 220 mm.
    • NA_LETTER Link icon

      public static final Paper NA_LETTER
      Specifies the North American letter size, 8.5 inches by 11 inches
    • TABLOID Link icon

      public static final Paper TABLOID
      Specifies the tabloid size, 11 inches by 17 inches.
    • EXECUTIVE Link icon

      public static final Paper EXECUTIVE
      Specifies the executive size, 7.25 inches by 10.5 inches.
    • NA_8X10 Link icon

      public static final Paper NA_8X10
      Specifies the North American 8 inch by 10 inch paper.
    • MONARCH_ENVELOPE Link icon

      public static final Paper MONARCH_ENVELOPE
      Specifies the Monarch envelope size, 3.875 inches by 7.5 inches.
    • NA_NUMBER_10_ENVELOPE Link icon

      public static final Paper NA_NUMBER_10_ENVELOPE
      Specifies the North American Number 10 business envelope size, 4.125 inches by 9.5 inches.
    • C Link icon

      public static final Paper C
      Specifies the engineering C size, 17 inch by 22 inch.
    • JIS_B4 Link icon

      public static final Paper JIS_B4
      Specifies the JIS B4 size, 257 mm by 364 mm.
    • JIS_B5 Link icon

      public static final Paper JIS_B5
      Specifies the JIS B5 size, 182 mm by 257 mm.
    • JIS_B6 Link icon

      public static final Paper JIS_B6
      Specifies the JIS B6 size, 128 mm by 182 mm.
    • JAPANESE_POSTCARD Link icon

      public static final Paper JAPANESE_POSTCARD
      Specifies the Japanese postcard size, 100 mm by 148 mm.
  • Method Details Link icon

    • getName Link icon

      public final String getName()
      Get the paper name. This may not be directly useful for user display as it is not localized.
      Returns:
      the paper name
    • getWidth Link icon

      public final double getWidth()
      Get the width of the paper in points (1/72 inch)
      Returns:
      the width of the paper in points (1/72 inch)
    • getHeight Link icon

      public final double getHeight()
      Get the height of the paper in points (1/72 inch)
      Returns:
      the height of the paper in points (1/72 inch)
    • hashCode Link icon

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals Link icon

      public final boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString Link icon

      public final String toString()
      Overrides:
      toString in class Object