This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/flutter/pdf-generation/blank-pdf.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Generate blank PDF in Flutter | Nutrient SDK

PDF generation is available only on the legacy method-channel API (package:nutrient_flutter/nutrient_flutter.dart), which is deprecated in Nutrient Flutter SDK 6. The APIs on this page aren’t part of the bindings API yet. They still work in SDK 6; import the legacy library to use them alongside bindings.dart if you use both. Nutrient plans to add a bindings equivalent. In the meantime, refer to the platform adapters guide to use native processors. For details, refer to the Flutter SDK 6 migration guide.

Use Nutrient(opens in a new tab) to create blank PDF documents.

The following example creates a new one-page blank PDF document from a NewPage object(opens in a new tab). A NewPage object can define the page size, colors, patterns, images, and pages from other documents. After processing, Nutrient saves the new blank document to outputPath:

// 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 about generating PDF files from HTML strings and URLs, refer to the Nutrient(opens in a new tab) API reference and the PDF generation example(opens in a new tab) from the Catalog app(opens in a new tab).