---
title: "Save PDF to local storage with Android library | Nutrient"
canonical_url: "https://www.nutrient.io/guides/android/save-a-document/to-local-storage/"
md_url: "https://www.nutrient.io/guides/android/save-a-document/to-local-storage.md"
last_updated: "2026-05-23T00:08:17.999Z"
description: "Learn how to disable automatic saving in Nutrient Android SDK and manually save PDF documents using Kotlin or Java for precise document management."
---

# Save PDFs to local storage on Android

Nutrient Android SDK automatically saves changes made to a document to your device’s file system. This default behavior can be disabled using the [`autosaveEnabled`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.configuration/-pdf-configuration/-builder/autosave-enabled.html) method of the [`PdfConfiguration.Builder`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.configuration/-pdf-configuration/-builder/index.html) class:

### KOTLIN

```kotlin

val configuration = PdfConfiguration.Builder().autosaveEnabled(false).build()

```

### JAVA

```java

final PdfConfiguration configuration = new PdfConfiguration.Builder().autosaveEnabled(false).build();

```

If not explicitly specified, all examples in this guide save the document automatically on device.

Once autosaving is disabled, you can take full control of when the document is saved by calling the [`save`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.document/-pdf-document/save.html) or [`saveIfModified`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.document/-pdf-document/save-if-modified.html) method of the [`PdfDocument`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.document/-pdf-document/index.html) class. You can access the instance of a document using the [`getDocument`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/get-document.html) method of [`PdfFragment`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.ui/-pdf-fragment/index.html) like so:

### KOTLIN

```kotlin

val document = activity.requirePdfFragment().document?: return

// Manually save the document.
document.saveIfModified()

```

### JAVA

```java

final PdfDocument document = activity.requirePdfFragment().getDocument();
if (document == null) return;

// Manually save the document.
document.saveIfModified();

```
---

## Related pages

- [Auto saving PDF files on Android](/guides/android/features/document-checkpointing.md)
- [How to save documents as PDFs on Android](/guides/android/save-a-document/save-as.md)
- [Save PDFs to a custom data provider on Android](/guides/android/save-a-document/to-custom-data-provider.md)
- [Incremental PDF saving on Android](/guides/android/faq/growing-pdf-file-size.md)
- [Save PDFs to a remote server on Android](/guides/android/save-a-document/to-remote-server.md)
- [Save PDFs to Document Engine on Android](/guides/android/save-a-document/to-document-engine.md)
- [Saving a PDF file on Android](/guides/android/save-a-document.md)

