<h2 id="capturesingleremotedocument-context-creationdisplayinfo-profile-content">captureSingleRemoteDocument</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
public suspend fun captureSingleRemoteDocument(
    context: Context,
    creationDisplayInfo: CreationDisplayInfo =
        createCreationDisplayInfo(context).toCreationDisplayInfo(),
    profile: Profile = RcPlatformProfiles.ANDROIDX,
    content: @Composable @RemoteComposable () -> Unit,
): CapturedDocument
```

Capture a RemoteCompose document by rendering the specified `content` Composable in a virtual
display and returning the resulting bytes.

This can be used for testing, or for generating documents on the fly to be sent to a remote
client.

This API is experimental and is likely to change in the future before becoming API stable.

#### Parameters

| | |
| --- | --- |
| context | the Android [Context](https://developer.android.com/reference/android/content/Context) to use for the capture. |
| creationDisplayInfo | details about the virtual display to create. |
| profile | the `Profile` to use for the capture, determining which operations are supported. |
| content | the Composable content to render and capture. |

#### Returns

| | |
| --- | --- |
|  | a `ByteArray` containing the RemoteCompose document. |