Gtk.PrintDialog.setup

### Method

# Gtk PrintDialogsetup

since: 4.14

#### Declaration [src]

    void
    gtk_print_dialog_setup (
      GtkPrintDialog* self,
      GtkWindow* parent,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

This function presents a print dialog to let the user select a printer, and set up print settings and page setup.

The `callback` will be called when the dialog is dismissed. It should call `gtk_print_dialog_setup_finish()` to obtain the results in the form of a `GtkPrintSetup`, that can then be passed to `gtk_print_dialog_print()` or `gtk_print_dialog_print_file()`.

One possible use for this method is to have the user select a printer, then show a page setup UI in the application (e.g. to arrange images on a page), then call `gtk_print_dialog_print()` on `self` to do the printing without further user interaction.

Available since: 4.14

This method completes asynchronously. Use `gtk_print_dialog_setup_finish()` inside the `GAsyncReadyCallback` to obtain the result of the operation.

#### Parameters

`parent`

  Type: `GtkWindow`

  The parent `GtkWindow`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`cancellable`

  Type: `GCancellable`

  A `GCancellable` to cancel the operation.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`callback`

  Type: `GAsyncReadyCallback`

  A callback to call when the operation is complete.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  Data to pass to `callback`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.