### Struct

# Gtk PaperSize

since: 4.0

#### 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.

Available since: 4.0

#### Constructors

###### gtk_paper_size_new

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

since: 4.0

###### gtk_paper_size_new_custom

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

since: 4.0

###### gtk_paper_size_new_from_gvariant

Deserialize a paper size from a `GVariant`.

since: 4.0

###### gtk_paper_size_new_from_ipp

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

since: 4.0

###### gtk_paper_size_new_from_key_file

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

since: 4.0

###### gtk_paper_size_new_from_ppd

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

since: 4.0

#### Functions

###### gtk_paper_size_get_default

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

since: 4.0

###### gtk_paper_size_get_paper_sizes

Creates a list of known paper sizes.

since: 4.0

#### Instance methods

###### gtk_paper_size_copy

Copies an existing `GtkPaperSize`.

since: 4.0

###### gtk_paper_size_free

Free the given `GtkPaperSize` object.

since: 4.0

###### gtk_paper_size_get_default_bottom_margin

Gets the default bottom margin for the `GtkPaperSize`.

since: 4.0

###### gtk_paper_size_get_default_left_margin

Gets the default left margin for the `GtkPaperSize`.

since: 4.0

###### gtk_paper_size_get_default_right_margin

Gets the default right margin for the `GtkPaperSize`.

since: 4.0

###### gtk_paper_size_get_default_top_margin

Gets the default top margin for the `GtkPaperSize`.

since: 4.0

###### gtk_paper_size_get_display_name

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

since: 4.0

###### gtk_paper_size_get_height

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

since: 4.0

###### gtk_paper_size_get_name

Gets the name of the `GtkPaperSize`.

since: 4.0

###### gtk_paper_size_get_ppd_name

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

since: 4.0

###### gtk_paper_size_get_width

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

since: 4.0

###### gtk_paper_size_is_custom

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

since: 4.0

###### gtk_paper_size_is_equal

Compares two `GtkPaperSize` objects.

since: 4.0

###### gtk_paper_size_is_ipp

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

since: 4.0

###### gtk_paper_size_set_size

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

since: 4.0

###### gtk_paper_size_to_gvariant

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

since: 4.0

###### gtk_paper_size_to_key_file

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

since: 4.0