V2 Pro Sunmi लेबल संस्करण और नॉल सेफ्टी का समर्थन करता है। इस पैकेज के साथ आप Sunmi प्रिंटर से कनेक्ट कर सकते हैं, टेक्स्ट, छवि, qrcode, बारकोड और अपने अनुकूल Esc/Pos प्रिंट कर सकते हैं।
सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
sunmi_printer_plus पैकेज एंड्रॉइड पर Sunmi V2 Pro लेबल प्रिंटर के साथ बिना किसी दिक्कत के एकीकरण की अनुमति देता है, जिसमें नल सुरक्षा और कस्टम Esc/Pos कमांड्स का समर्थन होता है। यह डेवलपर्स को फ्लटर ऐप्स से सीधे टेक्स्ट, इमेज, QR कोड और बारकोड प्रिंट करने की अनुमति देता है। विश्वसनीयता और उपयोग में आसानी के लिए डिज़ाइन किया गया, यह Sunmi हार्डवेयर पर प्रिंट जॉब भेजने के लिए एक सीधी-आसान API प्रदान करता है, जो रिटेल, लॉजिस्टिक्स और निकासी बिंदु एप्लिकेशन के लिए आदर्श है जिन्हें लेबल या रसीद प्रिंट करने की आवश्यकता होती है।
उपयोग
रिटेल रसीद प्रिंटिंग
लॉजिस्टिक्स के लिए लेबल प्रिंटिंग
बिक्री बिंदु प्रणाली
इन्वेंटरी प्रबंधन
कस्टम एस्क/पॉज कमांड निष्पादन
मुख्य विशेषताएँ
Sunmi V2 Pro लेबल प्रिंटर का समर्थन करता है
नल सुरक्षा संगत
प्रिंट टेक्स्ट, छवियाँ, क्यूआर कोड, बारकोड
कस्टम एस्क/पॉज कमांड सपोर्ट
Android-केवल प्लेटफॉर्म सुसंगतता
इनके लिए उपयुक्त
सनमी प्रिंटर के लिए फ्लटर विकासकर्ता
लेबल प्रिंटिंग की आवश्यकता वाले व्यापार एप्लिकेशन
POS प्रणाली एकीकरण
मोबाइल इन्वेंटरी समाधान
विचार योग्य बातें
केवल एंड्रॉइड
संगत Sunmi हार्डवेयर की आवश्यकता है
Esc/Pos-आधारित प्रिंटिंग तक सीमित
iOS या डेस्कटॉप समर्थन नहीं
उचित उपकरण की अनुमति की आवश्यकता है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
sunmi_printer_plus
This is a fork from sunmi_printer , 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_plus
What this package do
[x] Print in label mode (when avaliable!)
[x] Write some text (with style or not!)
[x] Change font size
[x] Jump (n) lines
[x] Draw a divisor line
[x] Bold mode on/off
[x] Print all types of Barcodes (see enum below)
[x] Print Qrcodes with custom width and error-level
[x] Print image from asset or from web (example show how to print both)
[x] Print rows like recepit with custom width and alignment
[x] Able to combine with some esc/pos code that you already have!
[x] Cut paper - Dedicated method just to cut the line
[x] Printer serial no - Get the serial number of the printer
[x] Printer version - Get the printer's version
[x] Printer paper size - Get the paper size ( 0: 80mm 1: 58mm)
[x] Get how many times the cash drawer was oppened
Tested Devices
Sunmi V2 Pro
Sunmi T2 mini
Sunmi V2S
You can also combine this package with the package esc_pos_utils
With this package you can create a custom escpos and than you don't need to use any other command.
This is good if you already have a code that another printers use, and u can reuse this code as well
#Just see the example folder!
// import packagesimport'package:sunmi_printer_plus/sunmi_printer_plus.dart';
// all method from sunmi printer need to async awaitawaitSunmiPrinter.bindingPrinter(); // must bind the printer first. for more exmaple.. pls refer to example tab.
Example code when use for transaction printing
awaitSunmiPrinter.startTransactionPrint(true);
awaitSunmiPrinter.setAlignment(SunmiPrintAlign.RIGHT); // Right alignawaitSunmiPrinter.printText('Align right');
awaitSunmiPrinter.setAlignment(SunmiPrintAlign.LEFT);// Left alignawaitSunmiPrinter.printText('Align left');
awaitSunmiPrinter.setAlignment(SunmiPrintAlign.CENTER);// Center alignawaitSunmiPrinter.printText('Align center');
awaitSunmiPrinter.lineWrap(2); // Jump 2 linesawaitSunmiPrinter.setFontSize(SunmiFontSize.XL); // Set font to very largeawaitSunmiPrinter.printText('Very Large font!');
awaitSunmiPrinter.resetFontSize(); // Reset font to medium sizeawaitSunmiPrinter.setCustomFontSize(12); // SET CUSTOM FONT 12awaitSunmiPrinter.printText('Custom font size!!!');
awaitSunmiPrinter.resetFontSize(); // Reset font to medium sizeawaitSunmiPrinter.printQRCode('https://github.com/brasizza/sunmi_printer'); // PRINT A QRCODEawaitSunmiPrinter.submitTransactionPrint(); // SUBMIT and cut paperawaitSunmiPrinter.exitTransactionPrint(true); // Close the transaction
awaitSunmiPrinter.lcdInitialize(); //Initialize the LCD awaitSunmiPrinter.lcdWakeup(); //Turn the LCD ONawaitSunmiPrinter.lcdSleep(); //Turn the LCD OFFawaitSunmiPrinter.lcdClear(); //Clear LCD screenawaitSunmiPrinter.lcdString('Hello'); //Write a simple line awaitSunmiPrinter.lcdString('Hello'); //Write a simple line awaitSunmiPrinter.lcdDoubleString('Hello', 'World'); //Write two linesUint8List byte = awaitreadFileBytes('assets/images/128x40.png');
awaitSunmiPrinter.lcdImage(byte); // Put an image in LCDawaitSunmiPrinter.lcdFillString('abcDEFgj0123\$&=+', size: 16, fill: true); // Print a string and fill with zeros until the size is reachedawaitSunmiPrinter.lcdMultiString([ 'Welcome to flutter.', 'Align 2.',], [ 1, 2,]); // Write multiple lines with alignent
boolawaitSunmiPrinter.drawerStatus(); //check if the cash drawer is connect or disconnectawaitSunmiPrinter.openDrawer(); //open de cash drawerintawaitSunmiPrinter.drawerTimesOpen(); //How many times de cash drawer was oppened