### Struct

# GtkPaperSize

#### Description [src]

    struct GtkPaperSize {
      /* No available fields */
    }

`GtkPaperSize` handles paper sizes.

It uses the standard called PWG 5101.1-2002 PWG: Standard for Media Standardized Names to name the paper sizes (and to get the data for the page sizes). In addition to standard paper sizes, `GtkPaperSize` allows to construct custom paper sizes with arbitrary dimensions.

The `GtkPaperSize` object stores not only the dimensions (width and height) of a paper size and its name, it also provides default print margins.

#### Constructors

###### gtk_paper_size_new

Creates a new `GtkPaperSize` object by parsing a PWG 5101.1-2002 paper name.

###### gtk_paper_size_new_custom

Creates a new `GtkPaperSize` object with the given parameters.

###### gtk_paper_size_new_from_gvariant

Deserialize a paper size from a `GVariant`.

###### gtk_paper_size_new_from_ipp

Creates a new `GtkPaperSize` object by using IPP information.

###### gtk_paper_size_new_from_key_file

Reads a paper size from the group `group_name` in the key file `key_file`.

###### gtk_paper_size_new_from_ppd

Creates a new `GtkPaperSize` object by using PPD information.

#### Functions

###### gtk_paper_size_get_default

Returns the name of the default paper size, which depends on the current locale.

###### gtk_paper_size_get_paper_sizes

Creates a list of known paper sizes.

#### Instance methods

###### gtk_paper_size_copy

Copies an existing `GtkPaperSize`.

###### gtk_paper_size_free

Free the given `GtkPaperSize` object.

###### gtk_paper_size_get_default_bottom_margin

Gets the default bottom margin for the `GtkPaperSize`.

###### gtk_paper_size_get_default_left_margin

Gets the default left margin for the `GtkPaperSize`.

###### gtk_paper_size_get_default_right_margin

Gets the default right margin for the `GtkPaperSize`.

###### gtk_paper_size_get_default_top_margin

Gets the default top margin for the `GtkPaperSize`.

###### gtk_paper_size_get_display_name

Gets the human-readable name of the `GtkPaperSize`.

###### gtk_paper_size_get_height

Gets the paper height of the `GtkPaperSize`, in units of `unit`.

###### gtk_paper_size_get_name

Gets the name of the `GtkPaperSize`.

###### gtk_paper_size_get_ppd_name

Gets the PPD name of the `GtkPaperSize`, which may be `NULL`.

###### gtk_paper_size_get_width

Gets the paper width of the `GtkPaperSize`, in units of `unit`.

###### gtk_paper_size_is_custom

Returns `TRUE` if `size` is not a standard paper size.

###### gtk_paper_size_is_equal

Compares two `GtkPaperSize` objects.

###### gtk_paper_size_is_ipp

Returns `TRUE` if `size` is an IPP standard paper size.

###### gtk_paper_size_set_size

Changes the dimensions of a `size` to `width` x `height`.

###### gtk_paper_size_to_gvariant

Serialize a paper size to an `a{sv}` variant.

###### gtk_paper_size_to_key_file

This function adds the paper size from `size` to `key_file`.