org.gnome.gtk

## Class PaperSize

- Object
- - org.freedesktop.bindings.Pointer
  - - org.gnome.glib.Boxed
    - - org.gnome.gtk.PaperSize

- Direct Known Subclasses:
    CustomPaperSize, InternationalPaperSize, NorthAmericanPaperSize

      public class PaperSize
      extends Boxed

  Representations of different sizes of paper used in printing operations.

  Usage is straight forward:

       paper = PaperSize.A4;
       width = paper.getWidth(Unit.MM);
       height = paper.getHeight(Unit.MM);

  The √2 relationships between the various ISO sizes are shown in the following diagram (the imperialist paper sizes are included for comparison):

  Constants for the two common page sizes are here. If you need one of the more obscure cases, see subclasses `InternationalPaperSize` or `NorthAmericanPaperSize`.

  Since:
    4.0.10
  Author:
    Andrew Cowie
  See Also:
    Wikipedia's article on paper sizes

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static PaperSize` | `A4` Standard sheet size in use worldwide.
    `static PaperSize` | `LETTER` Standard sheet size used in North America.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `static PaperSize` | `getDefault()` Returns the PaperSize corresponding to the default in effect for the current locale.
    `String` | `getDisplayName()`
    `double` | `getHeight(Unit in)` Get the height of a piece of paper in the specified units.
    `double` | `getWidth(Unit in)` Get the width of a piece of paper in the specified units.
    `String` | `toString()`

    - ### Methods inherited from class Object

      `getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### A4

          public static final PaperSize A4

      Standard sheet size in use worldwide. Corresponds to a piece of paper 210 mm x 297 mm. See `InternationalPaperSize` for other ISO paper size constants.

    - #### LETTER

          public static final PaperSize LETTER

      Standard sheet size used in North America. Corresponds to a piece of paper which is roughly 216 mm x 279 mm (which is 8.5 inch x 11 inch in pre-SI units). See `NorthAmericanPaperSize` for other imperialist paper sizes.

  - ### Method Detail

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### getDefault

          public static PaperSize getDefault()

      Returns the PaperSize corresponding to the default in effect for the current locale.

    - #### getDisplayName

          public String getDisplayName()

    - #### getHeight

          public double getHeight(Unit in)

      Get the height of a piece of paper in the specified units.
      Since:
        4.0.10

    - #### getWidth

          public double getWidth(Unit in)

      Get the width of a piece of paper in the specified units. You can call this as:

           w = paper.getWidth(Unit.MM);

      or

           w = paper.getWidth(Unit.POINTS);

      depending on your need.
      Since:
        4.0.10

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `org.freedesktop.bindings.Pointer`