Xdp.Portal.print_file

### Method

# Xdp Portalprint_file

#### Declaration [src]

    void
    xdp_portal_print_file (
      XdpPortal* portal,
      XdpParent* parent,
      const char* title,
      guint token,
      const char* file,
      XdpPrintFlags flags,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer data
    )

#### Description [src]

Prints a file.

If a valid token is present in the `options`, then this call will print with the settings from the Print call that the token refers to. If no token is present, then a print dialog will be presented to the user.

When the request is done, `callback` will be called. You can then call `xdp_portal_print_file_finish()` to get the results.

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

#### Parameters

`parent`

  Type: `XdpParent`

  Parent window information.

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

`title`

  Type: `const char*`

  Tile for the print dialog.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`token`

  Type: `guint`

  Token that was returned by a previous `xdp_portal_prepare_print()` call, or 0.

`file`

  Type: `const char*`

  Path of the document to print.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`flags`

  Type: `XdpPrintFlags`

  Options for this call.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable`.

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

`callback`

  Type: `GAsyncReadyCallback`

  A callback to call when the request is done.

  The argument can be `NULL`.

`data`

  Type: `gpointer`

  Data to pass to `callback`.

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