Skip to content
pubscout

pdf_maker

1.1.0, released 2 years ago by flutterwiki.com

Design custom Flutter pages and turn them into high-quality PDF documents.

WASM-ready
$ flutter pub add pdf_maker
Source repository

What it does

PDF Maker is a Flutter plugin that allows developers to design custom pages using standard widgets and convert them into high-quality, single-page or multi-page PDF documents. It provides real-time previews, multi-language support, and isolated rendering options for performance optimization.

AI-written summary of version 1.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to generate PDF documents from custom widget layouts in Flutter.
  • You want to support multi-page PDF documents with customizable formats, margins, and scales.
  • You require background isolate rendering to keep the UI thread responsive during PDF generation.

Skip it when

  • You need complex low-level programmatic PDF drawing operations outside of Flutter's widget tree.

Strengths

  • Design freedom using regular Flutter widgets via BlankPage subclasses.
  • Supports both single-page and multi-page PDF document generation.
  • Isolated rendering mode to prevent freezing the main UI thread during heavy PDF generation.

Weaknesses

  • Requires proper management of BuildContext to access theme data and contextual properties.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2

Add pdf_maker to your pubspec.yaml dependencies.

class TestPage extends BlankPage {
  const TestPage({super.key});

  @override
  Widget createPageContent(BuildContext context) {
    return const Center(
      child: Text('Save Palestine 🇵🇸'),
    );
  }
}

final pdfFile = await const TestPage().toPDF(
  setup: PageSetup(context: context),
);

Alternatives

Packages that do the same job and could replace pdf_maker.

Works with

Packages commonly used together with pdf_maker: ones it builds on, ones built on it, and its own family.