Gtk.PrintSettings
Description: Reference for Gtk.PrintSettings

### Class

# GtkPrintSettings

#### Description [src]

    final class Gtk.PrintSettings : GObject.Object {
      /* No available fields */
    }

A `GtkPrintSettings` object represents the settings of a print dialog in a system-independent way.

The main use for this object is that once you’ve printed you can get a settings object that represents the settings the user chose, and the next time you print you can pass that object in so that the user doesn’t have to re-set all his settings.

Its also possible to enumerate the settings so that you can easily save the settings for the next time your app runs, or even store them in a document. The predefined keys try to use shared values as much as possible so that moving such a document between systems still works.

#### Ancestors

- GObject

#### Constructors

###### gtk_print_settings_new

Creates a new `GtkPrintSettings` object.

###### gtk_print_settings_new_from_file

Reads the print settings from `file_name`.

###### gtk_print_settings_new_from_gvariant

Deserialize print settings from an a{sv} variant.

###### gtk_print_settings_new_from_key_file

Reads the print settings from the group `group_name` in `key_file`.

#### Instance methods

###### gtk_print_settings_copy

Copies a `GtkPrintSettings` object.

###### gtk_print_settings_foreach

Calls `func` for each key-value pair of `settings`.

###### gtk_print_settings_get

Looks up the string value associated with `key`.

###### gtk_print_settings_get_bool

Returns the boolean represented by the value that is associated with `key`.

###### gtk_print_settings_get_collate

Gets the value of `GTK_PRINT_SETTINGS_COLLATE`.

###### gtk_print_settings_get_default_source

Gets the value of `GTK_PRINT_SETTINGS_DEFAULT_SOURCE`.

###### gtk_print_settings_get_dither

Gets the value of `GTK_PRINT_SETTINGS_DITHER`.

###### gtk_print_settings_get_double

Returns the double value associated with `key`, or 0.

###### gtk_print_settings_get_double_with_default

Returns the floating point number represented by the value that is associated with `key`, or `default_val` if the value does not represent a floating point number.

###### gtk_print_settings_get_duplex

Gets the value of `GTK_PRINT_SETTINGS_DUPLEX`.

###### gtk_print_settings_get_finishings

Gets the value of `GTK_PRINT_SETTINGS_FINISHINGS`.

###### gtk_print_settings_get_int

Returns the integer value of `key`, or 0.

###### gtk_print_settings_get_int_with_default

Returns the value of `key`, interpreted as an integer, or the default value.

###### gtk_print_settings_get_length

Returns the value associated with `key`, interpreted as a length.

###### gtk_print_settings_get_media_type

Gets the value of `GTK_PRINT_SETTINGS_MEDIA_TYPE`.

###### gtk_print_settings_get_n_copies

Gets the value of `GTK_PRINT_SETTINGS_N_COPIES`.

###### gtk_print_settings_get_number_up

Gets the value of `GTK_PRINT_SETTINGS_NUMBER_UP`.

###### gtk_print_settings_get_number_up_layout

Gets the value of `GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT`.

###### gtk_print_settings_get_orientation

Get the value of `GTK_PRINT_SETTINGS_ORIENTATION`, converted to a `GtkPageOrientation`.

###### gtk_print_settings_get_output_bin

Gets the value of `GTK_PRINT_SETTINGS_OUTPUT_BIN`.

###### gtk_print_settings_get_page_ranges

Gets the value of `GTK_PRINT_SETTINGS_PAGE_RANGES`.

###### gtk_print_settings_get_page_set

Gets the value of `GTK_PRINT_SETTINGS_PAGE_SET`.

###### gtk_print_settings_get_paper_height

Gets the value of `GTK_PRINT_SETTINGS_PAPER_HEIGHT`, converted to `unit`.

###### gtk_print_settings_get_paper_size

Gets the value of `GTK_PRINT_SETTINGS_PAPER_FORMAT`, converted to a `GtkPaperSize`.

###### gtk_print_settings_get_paper_width

Gets the value of `GTK_PRINT_SETTINGS_PAPER_WIDTH`, converted to `unit`.

###### gtk_print_settings_get_print_pages

Gets the value of `GTK_PRINT_SETTINGS_PRINT_PAGES`.

###### gtk_print_settings_get_printer

Convenience function to obtain the value of `GTK_PRINT_SETTINGS_PRINTER`.

###### gtk_print_settings_get_printer_lpi

Gets the value of `GTK_PRINT_SETTINGS_PRINTER_LPI`.

###### gtk_print_settings_get_quality

Gets the value of `GTK_PRINT_SETTINGS_QUALITY`.

###### gtk_print_settings_get_resolution

Gets the value of `GTK_PRINT_SETTINGS_RESOLUTION`.

###### gtk_print_settings_get_resolution_x

Gets the value of `GTK_PRINT_SETTINGS_RESOLUTION_X`.

###### gtk_print_settings_get_resolution_y

Gets the value of `GTK_PRINT_SETTINGS_RESOLUTION_Y`.

###### gtk_print_settings_get_reverse

Gets the value of `GTK_PRINT_SETTINGS_REVERSE`.

###### gtk_print_settings_get_scale

Gets the value of `GTK_PRINT_SETTINGS_SCALE`.

###### gtk_print_settings_get_use_color

Gets the value of `GTK_PRINT_SETTINGS_USE_COLOR`.

###### gtk_print_settings_has_key

Returns `TRUE`, if a value is associated with `key`.

###### gtk_print_settings_load_file

Reads the print settings from `file_name`.

###### gtk_print_settings_load_key_file

Reads the print settings from the group `group_name` in `key_file`.

###### gtk_print_settings_set

Associates `value` with `key`.

###### gtk_print_settings_set_bool

Sets `key` to a boolean value.

###### gtk_print_settings_set_collate

Sets the value of `GTK_PRINT_SETTINGS_COLLATE`.

###### gtk_print_settings_set_default_source

Sets the value of `GTK_PRINT_SETTINGS_DEFAULT_SOURCE`.

###### gtk_print_settings_set_dither

Sets the value of `GTK_PRINT_SETTINGS_DITHER`.

###### gtk_print_settings_set_double

Sets `key` to a double value.

###### gtk_print_settings_set_duplex

Sets the value of `GTK_PRINT_SETTINGS_DUPLEX`.

###### gtk_print_settings_set_finishings

Sets the value of `GTK_PRINT_SETTINGS_FINISHINGS`.

###### gtk_print_settings_set_int

Sets `key` to an integer value.

###### gtk_print_settings_set_length

Associates a length in units of `unit` with `key`.

###### gtk_print_settings_set_media_type

Sets the value of `GTK_PRINT_SETTINGS_MEDIA_TYPE`.

###### gtk_print_settings_set_n_copies

Sets the value of `GTK_PRINT_SETTINGS_N_COPIES`.

###### gtk_print_settings_set_number_up

Sets the value of `GTK_PRINT_SETTINGS_NUMBER_UP`.

###### gtk_print_settings_set_number_up_layout

Sets the value of `GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT`.

###### gtk_print_settings_set_orientation

Sets the value of `GTK_PRINT_SETTINGS_ORIENTATION`.

###### gtk_print_settings_set_output_bin

Sets the value of `GTK_PRINT_SETTINGS_OUTPUT_BIN`.

###### gtk_print_settings_set_page_ranges

Sets the value of `GTK_PRINT_SETTINGS_PAGE_RANGES`.

###### gtk_print_settings_set_page_set

Sets the value of `GTK_PRINT_SETTINGS_PAGE_SET`.

###### gtk_print_settings_set_paper_height

Sets the value of `GTK_PRINT_SETTINGS_PAPER_HEIGHT`.

###### gtk_print_settings_set_paper_size

Sets the value of `GTK_PRINT_SETTINGS_PAPER_FORMAT`, `GTK_PRINT_SETTINGS_PAPER_WIDTH` and `GTK_PRINT_SETTINGS_PAPER_HEIGHT`.

###### gtk_print_settings_set_paper_width

Sets the value of `GTK_PRINT_SETTINGS_PAPER_WIDTH`.

###### gtk_print_settings_set_print_pages

Sets the value of `GTK_PRINT_SETTINGS_PRINT_PAGES`.

###### gtk_print_settings_set_printer

Convenience function to set `GTK_PRINT_SETTINGS_PRINTER` to `printer`.

###### gtk_print_settings_set_printer_lpi

Sets the value of `GTK_PRINT_SETTINGS_PRINTER_LPI`.

###### gtk_print_settings_set_quality

Sets the value of `GTK_PRINT_SETTINGS_QUALITY`.

###### gtk_print_settings_set_resolution

Sets the values of `GTK_PRINT_SETTINGS_RESOLUTION`, `GTK_PRINT_SETTINGS_RESOLUTION_X` and `GTK_PRINT_SETTINGS_RESOLUTION_Y`.

###### gtk_print_settings_set_resolution_xy

Sets the values of `GTK_PRINT_SETTINGS_RESOLUTION`, `GTK_PRINT_SETTINGS_RESOLUTION_X` and `GTK_PRINT_SETTINGS_RESOLUTION_Y`.

###### gtk_print_settings_set_reverse

Sets the value of `GTK_PRINT_SETTINGS_REVERSE`.

###### gtk_print_settings_set_scale

Sets the value of `GTK_PRINT_SETTINGS_SCALE`.

###### gtk_print_settings_set_use_color

Sets the value of `GTK_PRINT_SETTINGS_USE_COLOR`.

###### gtk_print_settings_to_file

This function saves the print settings from `settings` to `file_name`.

###### gtk_print_settings_to_gvariant

Serialize print settings to an a{sv} variant.

###### gtk_print_settings_to_key_file

This function adds the print settings from `settings` to `key_file`.

###### gtk_print_settings_unset

Removes any value associated with `key`.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Signals

##### Signals inherited from GObject (1)

###### GObject.Object::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.