# PageSelection

Artifact: [androidx.pdf:pdf-core](https://developer.android.com/jetpack/androidx/releases/pdf) [View Source](https://cs.android.com/search?q=file:androidx/pdf/content/PageSelection.kt+class:androidx.pdf.content.PageSelection) Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

*** ** * ** ***


```
public final class PageSelection
```

<br />

*** ** * ** ***

Represents the list of selected content on a particular page of the PDF document. By default, the selection boundary is represented from left to right.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/pdf/content/PageSelection#PageSelection(kotlin.Int,androidx.pdf.content.SelectionBoundary,androidx.pdf.content.SelectionBoundary,kotlin.collections.List)( int page, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/pdf/content/SelectionBoundary start, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/pdf/content/SelectionBoundary stop, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/pdf/content/PdfPageContent> selectedContents )` |

| ### Public methods |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/pdf/content/PageSelection#getPage()()` : The page number of the selection. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/pdf/content/PdfPageContent>` | `https://developer.android.com/reference/androidx/pdf/content/PageSelection#getSelectedContents()()` : list of segments of selected content. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/pdf/content/SelectionBoundary` | `https://developer.android.com/reference/androidx/pdf/content/PageSelection#getStart()()` : Boundary where the selection starts. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/pdf/content/SelectionBoundary` | `https://developer.android.com/reference/androidx/pdf/content/PageSelection#getStop()()` : Boundary where the selection stops. |

## Public constructors

### PageSelection

```
public PageSelection(
    int page,
    @NonNull SelectionBoundary start,
    @NonNull SelectionBoundary stop,
    @NonNull List<@NonNull PdfPageContent> selectedContents
)
```

| Parameters |
|---|---|
| `int page` | : The page number of the selection. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/pdf/content/SelectionBoundary start` | : Boundary where the selection starts. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/pdf/content/SelectionBoundary stop` | : Boundary where the selection stops. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/pdf/content/PdfPageContent> selectedContents` | : list of segments of selected content. |

## Public methods

### getPage

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
public final int getPage()
```

: The page number of the selection.

### getSelectedContents

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
public final @NonNull List<@NonNull PdfPageContent> getSelectedContents()
```

: list of segments of selected content.

### getStart

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
public final @NonNull SelectionBoundary getStart()
```

: Boundary where the selection starts.

### getStop

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
public final @NonNull SelectionBoundary getStop()
```

: Boundary where the selection stops.