Pdf for Dart and Flutter

This set of plugins allows Flutter apps to generate and print pdf files to the device printer. This plugin works for iOS and Android.

This library is divided into two parts:

  • a low-level Pdf creation library that takes care of the pdf bits generation.
  • a Widgets system similar to Flutter's, for easy high-level Pdf creation.

It can create a full multi-pages document with graphics, images, and text using TrueType fonts. With the ease of use you already know.

See an interactive demo here: https://davbfr.github.io/dart_pdf/.

Example document

example

Use the printing package https://pub.dev/packages/printing for full flutter print and share operation.

The coordinate system is using the internal Pdf unit:

1.0 is defined as 1 / 72.0 inch
you can use the constants for centimeters, millimeters, and inch defined in PdfPageFormat

GitHub

https://github.com/DavBfr/dart_pdf