PrintingPlugin class

Print plugin targeting Flutter on the Web

Inheritance
  • Object
  • PlatformInterface
  • PrintingPlugin

Constructors

PrintingPlugin()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

convertHtml(String html, String? baseUrl, PdfPageFormat format) Future<Uint8List>
Convert an html document to a pdf data
info() Future<PrintingInfo>
Returns a PrintingInfo object representing the capabilities supported for the current platform
layoutPdf(Printer? printer, LayoutCallback onLayout, String name, PdfPageFormat format, bool dynamicLayout, bool usePrinterSettings, OutputType outputType, bool forceCustomPrintPaper) Future<bool>
Prints a Pdf document to a local printer using the platform UI the Pdf document is re-built in a LayoutCallback each time the user changes a setting like the page format or orientation.
listPrinters() Future<List<Printer>>
Enumerate the available printers on the system.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pickPrinter(Rect bounds) Future<Printer>
Opens the native printer picker interface, and returns the URL of the selected printer.
raster(Uint8List document, List<int>? pages, double dpi) Stream<PdfRaster>
Convert a Pdf document to bitmap images
sharePdf(Uint8List bytes, String filename, Rect bounds, String? subject, String? body, List<String>? emails) Future<bool>
Displays a platform popup to share the Pdf document to another application.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

registerWith(Registrar registrar) → void
Registers this class as the default instance of PrintingPlugin.