# Generate a blank PDF in Flutter

Nutrient enables you to create blank PDF documents from scratch with [`Nutrient`](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter/Nutrient-class.html).

The following example creates a new single-page blank PDF document from a [`NewPage` object](https://github.com/PSPDFKit/pspdfkit-flutter/blob/master/lib/src/processor/new_page.dart). This can define the size of the page, colors, patterns, images, and pages of other documents. After processing, the `outputPath` will contain the new blank document:

```dart

// Location where to save the generated PDF.
String outputPath = '<writable-output-path>';

List<NewPage> pages = [
    // `NewPage` from blank PDF pattern.
    NewPage.fromPattern(
        PagePattern.blank, pageSize: PageSize.a5),
];

// Generate blank PDF document.
var filePath = await Nutrient.generatePdf(pages, outputPath);

```

For more information on generating PDF files from HTML strings and URLs, see the [`Nutrient`](https://pub.dev/documentation/nutrient_flutter/latest/nutrient_flutter/Nutrient-class.html) API reference and the [PDF Generation Example](https://github.com/PSPDFKit/pspdfkit-flutter/blob/master/example/lib/pdf_generation_example.dart) from the [Catalog app](https://github.com/PSPDFKit/pspdfkit-flutter).
---

## Related pages

- [Create PDFs from HTML in Flutter](/guides/flutter/pdf-generation/from-html.md)
- [Generate a PDF from an image in Flutter](/guides/flutter/pdf-generation/from-images.md)
- [Generate a PDF from a template in Flutter](/guides/flutter/pdf-generation/from-template.md)
- [PDF Generation library for Flutter](/guides/flutter/pdf-generation.md)

