printing
5.15.1, released 2 months ago by nfet.net
Plugin to generate and print PDFs on Android, iOS, macOS, Windows, Linux and web
What it does
It lets Flutter apps create PDF documents using the pdf package and send them to native print services or share them. It also provides a PdfPreview widget for displaying PDFs in the app.
AI-written summary of version 5.15.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- Need to print or share PDFs from a Flutter app
- Want a preview widget that auto‑reloads PDFs during development
- Need to convert HTML to PDF on the fly
Skip it when
- You only need to display static images or text without printing
- Your app targets a single platform and you prefer a lightweight solution
Strengths
- Cross‑platform support (Android, iOS, macOS, Windows, Linux, web)
- Built‑in PdfPreview widget with hot‑reload
- Supports PDF conversion from HTML and image assets
- Handles PDF encryption and digital signatures
Weaknesses
- Requires native configuration on each platform (iOS Swift, macOS entitlements, Windows PDFium)
- Large dependency tree (pdf, http, image, etc.)
- Some platform bugs fixed only in recent releases
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 7
iOS: add use_frameworks! to Podfile; macOS: add print entitlement; Windows/Linux: set PDFIUM_VERSION and PDFIUM_ARCH in CMakeLists.txt; web: optional script to set pdf.js version
final doc = pw.Document();
await Printing.layoutPdf(onLayout: (format) async => doc.save());Alternatives
Packages that do the same job and could replace printing.
- gql
Parse, transform and print GraphQL documents in Dart.
76Compare - acronym
A simple package to generate acronyms from strings with support for stop words and syllables.
45Compare - esc_pos_printer
Print receipts using an ESC/POS thermal WiFi or Ethernet printer in Flutter and Dart projects.
50Compare - esc_pos_utils_plus
Generate ESC/POS commands for thermal receipt printers.
50Compare
Works with
Packages commonly used together with printing: ones it builds on, ones built on it, and its own family.
- webprinting depends on itLightweight bindings for browser APIs via JS interop
- plugin_platform_interfaceprinting depends on itReusable base class for platform interfaces of Flutter federated plugins.
- imageprinting depends on itPure Dart library to load, manipulate, encode, and decode various image formats.
- pdfprinting depends on itA PDF generation library for Dart and Flutter using a widget-like layout system.