### Method

# Rsvg Handleread_stream_sync

#### Declaration [src]

    gboolean
    rsvg_handle_read_stream_sync (
      RsvgHandle* handle,
      GInputStream* stream,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Reads `stream` and writes the data from it to `handle`.

Before calling this function, you may need to call `rsvg_handle_set_base_uri()` or `rsvg_handle_set_base_gfile()` to set the “base file” for resolving references to external resources. SVG elements like `<image>` which reference external resources will be resolved relative to the location you specify with those functions.

If `cancellable` is not `NULL`, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error `G_IO_ERROR_CANCELLED` will be returned.

Available since: | 2.32

#### Parameters

`stream` | `GInputStream`
| A `GInputStream`
| The data is owned by the caller of the function.
`cancellable` | `GCancellable`
| A `GCancellable`, or `NULL`
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `gboolean`
| `TRUE` if reading `stream` succeeded, or `FALSE` otherwise with `error` filled in.