urovo_print

A Flutter plugin for Urovo thermal printers with QR code, barcode, and text printing support.

Features

  • Print text with custom fonts and sizes
  • Print barcodes (various formats)
  • Print QR codes
  • Print bitmaps/images
  • Draw lines and shapes
  • Printer status checking
  • Configurable print settings (speed, gray level)

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  urovo_print: ^0.0.1

Usage

import 'package:urovo_print/urovo_print.dart';

// Initialize printer
final printer = UrovoPrint();

// Open printer
int result = await printer.open();
if (result == 0) {
  // Printer opened successfully
  
  // Setup page (384px width)
  await printer.setupPage(384, -1);
  
  // Print text
  await printer.drawText("Hello World", 0, 0, "simsun", 26, false, false, 0);
  
  // Print QR code
  Uint8List qrImage = await generateQrCode("https://example.com");
  await printer.drawBitmap(qrImage, 0, 50);
  
  // Print the page
  await printer.printPage(0);
  
  // Cleanup
  await printer.setupPage(-1, -1);
  await printer.clearPage();
  await printer.close();
}

Requirements

  • Android API 16+
  • Urovo thermal printer
  • Urovo Platform SDK v4.1.0326 (included)

License

Add your license here