---
title: "Open multiple PDF files in Android viewer | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/android/features/working-with-multiple-documents/"
md_url: "https://www.nutrient.io/guides/android/features/working-with-multiple-documents.md"
last_updated: "2026-05-30T02:20:01.181Z"
description: "Nutrient Android SDK supports loading multiple documents into a single PdfActivity. This guide will outline how to launch the PdfActivity."
---

# Opening multiple PDFs in our Android viewer

Nutrient Android SDK supports loading multiple documents into a single [`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html). This guide will outline how to launch the [`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html), as well as how to control which documents are displayed.

## Launching PdfActivity

Depending on how many documents you want to display in the [`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html), there are different ways to do it.

### Displaying one document

If you’re just displaying a single document, the [`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html) itself has a convenient method to do this:

### KOTLIN

```kotlin

// Shows the document found at the given URI.
PdfActivity.showDocument(context, uri, configuration)

```

### JAVA

```java

// Shows the document found at the given URI.
PdfActivity.showDocument(context, uri, configuration);

```

### Displaying multiple documents

If you need to display two or more documents in a [`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html), you’ll have to use the [`PdfActivityIntentBuilder`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity-intent-builder/index.html):

### KOTLIN

```kotlin

// `PdfActivity` uses a document descriptor to identify each document that should be loaded.
// These will be displayed as tabs if the tabs UI is enabled in the configuration.
val intent = PdfActivityIntentBuilder.fromDocumentDescriptor(
        context,
        // Shows the document found at the given URI.
        DocumentDescriptor.fromUri(documentUri),
        // You can also serve the document via `DataProvider`.
        DocumentDescriptor.fromDataProvider(dataProvider),
        // Or you can show an image document.
        DocumentDescriptor.imageDocumentFromUri(documentUri)).configuration(configuration)
    // Show the second document (zero-based index) initially..visibleDocument(1).build()
context.startActivity(intent)

```

### JAVA

```java

// `PdfActivity` uses a document descriptor to identify each document that should be loaded.
// These will be displayed as tabs if the tabs UI is enabled in the configuration.
Intent intent = PdfActivityIntentBuilder.fromDocumentDescriptor(
        context,
        // Shows the document found at the given URI.
        DocumentDescriptor.fromUri(documentUri),
        // You can also serve the document via `DataProvider`.
        DocumentDescriptor.fromDataProvider(dataProvider),
        // Or you can show an image document.
        DocumentDescriptor.imageDocumentFromUri(documentUri)).configuration(configuration)
    // Show the second document (zero-based index) initially..visibleDocument(1).build();
context.startActivity(intent);

```

### Displaying PdfActivity without documents

Finally, you can also start the [`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html) without any document at all using [`emptyActivity()`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity-intent-builder/empty-activity.html):

### KOTLIN

```kotlin

// Shows the empty activity.
val intent = PdfActivityIntentBuilder.emptyActivity(context).configuration(configuration).build()
context.startActivity(intent)

```

### JAVA

```java

// Shows the empty activity.
Intent intent = PdfActivityIntentBuilder.emptyActivity(context).configuration(configuration).build();
context.startActivity(intent);

```

## Managing displayed documents

Once you start the [`PdfActivity`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-activity/index.html), you can manage the displayed documents by using the [`DocumentCoordinator`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-document-coordinator/index.html). To obtain an instance, use [`PdfActivity#getDocumentCoordinator()`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-ui/get-document-coordinator.html). To see an example of how this can be used, check out `DocumentTabsExample` in our Catalog app:

### KOTLIN

```kotlin

// Add a new document.
documentCoordinator.addDocument(descriptor)

// Display the newly added document.
documentCoordinator.setVisibleDocument(descriptor)

// Remove some other document.
documentCoordinator.removeDocument(otherDescriptor)

```

### JAVA

```java

// Add a new document.
getDocumentCoordinator().addDocument(descriptor);

// Display the newly added document.
getDocumentCoordinator().setVisibleDocument(descriptor);

// Remove some other document.
getDocumentCoordinator.removeDocument(otherDescriptor);

```

## UI for handling multiple documents

By default, Nutrient provides a tabbed user interface to allow the user to switch between all the currently opened documents.

You can also build an entirely custom UI to switch between documents using the [`DocumentCoordinator`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-document-coordinator/index.html) as shown in `DocumentSwitcherExample` found in the Catalog app.
---

## Related pages

- [Enable night theme in Android PDF viewer](/guides/android/viewer/viewing-options/night-theme.md)
- [Optimize pdf viewing with android reader view](/guides/android/features/reader-view.md)
- [Right-to-left (RTL) support in our Android PDF viewer](/guides/android/miscellaneous/page-bindings.md)

