Gtk.PrintDialog.print_file

### Method

# Gtk PrintDialogprint_file

unstable since: 4.14

#### Declaration [src]

    void
    gtk_print_dialog_print_file (
      GtkPrintDialog* self,
      GtkWindow* parent,
      GFile* file,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

This function prints a file.

If `gtk_print_dialog_prepare_print()` has not been called on `self` before, then this method might present a print dialog. Otherwise, it will attempt to print directly, without user interaction.

The `callback` will be called when the printing is done. It should call `gtk_print_dialog_print_file_finish()` to obtain the results.

Available since: 4.14

#### Parameters

`parent`

  Type: `GtkWindow`

  The parent `GtkWindow`

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

`file`

  Type: `GFile`

  The `GFile` to print.

  The data is owned by the caller of the function.

`cancellable`

  Type: `GCancellable`

  A `GCancellable` to cancel the operation.

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

`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 function.