sunmi_printer_pro

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

sunmi printer pro

sunmi_printer_pro #
This is a fork from sunmi_printer and ideal sunmi_printer_pro, but i implemented a lot of other features described below #
Important: #
THIS PACKAGE WILL WORK ONLY IN ANDROID!
Support Sunmi and Null Safety.
I build this flutter plugin based on this:
Official Sunmi Inner Printer Doc. But not all method from doc was included in this package, beacuse i don't have equipment. If you have and can help me, just contact me on github!
Installation #
flutter pub add sunmi_printer_pro
copied to clipboard
What this package do #

✅ Write some text (with style or not!)
✅ Change font size
✅ Jump (n) lines
✅ Draw a divisor line
✅ Bold mode on/off
✅ Underline mode on/off
✅ Print Qrcodes with custom width and error-level
✅ Print image from asset or from web (example show how to print both)
✅ Print rows like recepit with custom width and alignment
✅ Able to combine with some esc/pos code that you already have!
✅ Cut paper - Dedicated method just to cut the line
✅ Printer serial no - Get the serial number of the printer
✅ Printer version - Get the printer's version
✅ Printer paper size - Get the paper size ( 0: 80mm 1: 58mm)

Tested Devices #
sunmi_printer_proSunmiPrinterPro
Sunmi V2 Pro
Sunmi T2 mini
IPos B08
copied to clipboard
// import packages
import 'package:sunmi_printer_pro/sunmi_printer_pro.dart';


// all method from sunmi printer need to async await
await SunmiPrinterProPro.bindingPrinter(); // must bind the printer first. for more exmaple.. pls refer to example tab.

copied to clipboard
Example code when use for transaction printing #
await SunmiPrinterPro.startTransactionPrint(true);

// Right align
await SunmiPrinterPro.printText('Align right',sunmiPrintAlign: SunmiPrintAlign.right);

// Left align
await SunmiPrinterPro.printText('Align left',sunmiPrintAlign: SunmiPrintAlign.left);

// Center align
await SunmiPrinterPro.printText('Align center',sunmiPrintAlign: SunmiPrintAlign.center,);

await SunmiPrinterPro.lineWrap(2); // Jump 2 lines

// Set font to very large
await SunmiPrinterPro.printText('Very Large font!',fontSize: 36);

await SunmiPrinterPro.printQRCode('https://github.com/HVLoc/sunmi_printer_pro'); // PRINT A QRCODE
await SunmiPrinterPro.submitTransactionPrint(); // SUBMIT and cut paper
await SunmiPrinterPro.exitTransactionPrint(true); // Close the transaction

copied to clipboard
List of enum Alignments #
enum SunmiPrintAlign {
left,
center,
right,
}
copied to clipboard
List of enum Qrcode levels #
enum SunmiQrcodeLevel {
LEVEL_L,
LEVEL_M,
LEVEL_Q,
LEVEL_H,
}
copied to clipboard
List of enum Barcode types #
enum SunmiBarcodeType {
UPCA,
UPCE,
JAN13,
JAN8,
CODE39,
ITF,
CODABAR,
CODE93,
CODE128,
}
copied to clipboard
List of enum Text position in barcode #
enum SunmiBarcodeTextPos {
NO_TEXT,
TEXT_ABOVE,
TEXT_UNDER,
BOTH,
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.