# createRemoteCreationDisplayInfo

> Creates a [RemoteCreationDisplayInfo] instance from the provided [Context].

## API Reference

### createRemoteCreationDisplayInfo

> Source set: Android

```kotlin
public fun createRemoteCreationDisplayInfo(
    context: Context,
    size: Size =
        Size(
            width = context.resources.displayMetrics.widthPixels.toFloat(),
            height = context.resources.displayMetrics.heightPixels.toFloat(),
        ),
    isInspectionMode: Boolean = false,
    densityBehavior: RemoteDensityBehavior = RemoteDensityBehavior.Legacy,
): RemoteCreationDisplayInfo
```

Creates a [RemoteCreationDisplayInfo](https://composables.com/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteCreationDisplayInfo/api.md) instance from the provided `Context`.

This function extracts the display metrics (width, height, and density) from the `Context`'s
resources.

Example of creating display info with custom dimensions for document capture:

#### Parameters

| | |
| --- | --- |
| context | The [Context](https://developer.android.com/reference/android/content/Context) used to access display metrics. |
| size | The size of the display in pixels. Defaults to the display metrics from [context](https://composables.com/jetpack-compose/androidx.tv/tv-material/properties/context/api.md). |
| isInspectionMode | Whether the capture is happening in inspection mode (e.g. for a preview). Defaults to `false`. |
| densityBehavior | The [RemoteDensityBehavior](https://composables.com/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteDensityBehavior/api.md) to use. Defaults to `RemoteDensityBehavior.Legacy`. |

#### Return

A [RemoteCreationDisplayInfo](https://composables.com/jetpack-compose/androidx.compose.remote/remote-creation-compose/functions/RemoteCreationDisplayInfo/api.md) object containing the display metrics from the context.
