# RemoteDocumentPreview

## Functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/remote/tooling/preview/RemoteDocumentPreview.composable#RemoteDocumentPreview(androidx.compose.remote.player.core.RemoteDocument,androidx.compose.ui.Modifier)( remoteDocument: androidx.compose.remote.player.core.RemoteDocument, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier )` Displays a in the Android Studio Preview. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/remote/tooling/preview/RemoteDocumentPreview.composable#RemoteDocumentPreview(kotlin.ByteArray,androidx.compose.ui.Modifier,androidx.compose.remote.creation.profile.Profile)( document: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, profile: https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/profile/Profile? )` Displays a in the Android Studio Preview from a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html`. |

## Functions

### RemoteDocumentPreview

Artifact: [androidx.compose.remote:remote-tooling-preview](https://developer.android.com/jetpack/androidx/releases/compose-remote) [View Source](https://cs.android.com/search?q=file:androidx/compose/remote/tooling/preview/RemoteDocumentPreview.kt+function:RemoteDocumentPreview) Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/compose-remote#1.0.0-alpha23)

```
@Composable
fun RemoteDocumentPreview(
    remoteDocument: androidx.compose.remote.player.core.RemoteDocument,
    modifier: Modifier = Modifier
): Unit
```

Displays a in the Android Studio Preview.

This composable is intended for use within Android Studio to preview the content of a . It handles setting up the necessary Remote Compose player environment.

| Parameters |
|---|---|
| `remoteDocument: androidx.compose.remote.player.core.RemoteDocument` | The containing the content to be displayed. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | The modifier to be applied to the box containing the preview. |

### RemoteDocumentPreview

Artifact: [androidx.compose.remote:remote-tooling-preview](https://developer.android.com/jetpack/androidx/releases/compose-remote) [View Source](https://cs.android.com/search?q=file:androidx/compose/remote/tooling/preview/RemoteDocumentPreview.kt+function:RemoteDocumentPreview) Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/compose-remote#1.0.0-alpha23)

```
@Composable
fun RemoteDocumentPreview(
    document: ByteArray,
    modifier: Modifier = Modifier,
    profile: Profile? = null
): Unit
```

Displays a in the Android Studio Preview from a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html`.

This is a convenience overload that takes the raw document bytes directly and optionally configures the document buffer with `https://developer.android.com/reference/kotlin/androidx/compose/remote/tooling/preview/package-summary#RemoteDocumentPreview(kotlin.ByteArray,androidx.compose.ui.Modifier,androidx.compose.remote.creation.profile.Profile)` before inflating the .

| Parameters |
|---|---|
| `document: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html` | The raw byte array representing the . |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | The modifier to be applied to the box containing the preview. |
| `profile: https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/profile/Profile? = null` | Optional `https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/profile/Profile` used to configure the document buffer before inflation. |