We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I followed your example and tried printing via USB. Text was fine. But the image is output as text and the layout is messed up.
Does it not support image output by any chance?
I am attaching my source.
connect
_connect(int vendorId, int productId) async { bool? returned = false; try { returned = await flutterUsbPrinter.connect(vendorId, productId); } on PlatformException { //response = 'Failed to get platform version.'; } if (returned!) { setState(() { connected = true; }); } }
getDevice
_getDevicelist() async { List<Map<String, dynamic>> results = []; results = await FlutterUsbPrinter.getUSBDeviceList(); print(" length: ${results.length}"); setState(() { devices = results; }); }
print
_print() async { try { // var data = Uint8List.fromList( // utf8.encode(" Hello world Testing ESC POS printer...")); final ByteData bytes = await rootBundle.load('assets/images/1-1.JPG'); final Uint8List list = bytes.buffer.asUint8List(); await flutterUsbPrinter.write(list); } on PlatformException { print('no printing.'); } }
The text was updated successfully, but these errors were encountered:
please take a look the example in link below: https://github.com/kechankrisna/esc_pos_utils it will demonstrate on how to get list to write in printer port.
Sorry, something went wrong.
Is the package available only for esc/pos printer? Can it be used with laser printers?
this package is only work with esc pos printer, if you want to try laster printers, I recommend you to use printing
No branches or pull requests
I followed your example and tried printing via USB. Text was fine. But the image is output as text and the layout is messed up.
Does it not support image output by any chance?
I am attaching my source.
connect
getDevice
print
The text was updated successfully, but these errors were encountered: