---
title: "Generate blank PDF on Android | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/android/features/document-creation/"
md_url: "https://www.nutrient.io/guides/android/features/document-creation.md"
last_updated: "2026-05-26T01:23:09.553Z"
description: "Nutrient can create new blank PDF documents from scratch by using PdfProcessor."
---

# Generate blank PDFs on Android

Nutrient can create new blank PDF documents from scratch by using [`PdfProcessor`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.document.processor/-pdf-processor/index.html).

The following example creates a new [`PdfProcessorTask`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.document.processor/-pdf-processor-task/index.html) and passes in a [`NewPage`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.document.processor/-new-page/index.html) object. This can define the size of the page, colors, patterns, images, or pages of other documents. After processing, the `outputFile` will contain the new blank document:

### KOTLIN

```kotlin

private fun createNewDocument() {
    val outputFile = context.filesDir.resolve("new-document.pdf")

    // Create a new processor task, passing in a new page definition. This can also define colors, images, or pages of other documents.
    val task = PdfProcessorTask.newPage(NewPage.patternPage(NewPage.PAGE_SIZE_A4, PagePattern.LINES_7MM).build())

    // Start document processing, creating a blank file.
    PdfProcessor.processDocument(task, outputFile)
}

```

### JAVA

```java

private void createNewDocument() {
    final File outputFile = new File(context.getFilesDir(), "new-document.pdf");

    // Create a new processor task, passing in a new page definition. This can also define colors, images, or pages of other documents.
    final PdfProcessorTask task = PdfProcessorTask.newPage(NewPage.patternPage(NewPage.PAGE_SIZE_A4, PagePattern.LINES_7MM).build());

    // Start document processing, creating a blank file.
    PdfProcessor.processDocument(task, outputFile);
}

```
---

## Related pages

- [Generate PDFs from a template on Android](/guides/android/pdf-generation/from-template.md)
- [Effortlessly generate PDFs from images on Android](/guides/android/pdf-generation/from-images.md)
- [PDF generation library for Android](/guides/android/pdf-generation.md)
- [Generate PDFs from HTML on Android](/guides/android/pdf-generation/from-html.md)
- [Generate PDFs programmatically on Android](/guides/android/pdf-generation/programmatically.md)
- [Generate PDF reports on Android](/guides/android/generating-pdfs/generating-pdf-reports.md)
- [Effortlessly generate PDF thumbnails on Android](/guides/android/pdf-generation/thumbnail-preview.md)

