Skip to content

Conversation

@iRaySpace
Copy link

Description:

  • Be able to select USB devices
  • Be able to write bytes to printer with/without Ticket class

Tested on Issyzone POS - ITPP047

Feedback are welcome!

Regards,

Bai Web and Mobile Lab Team

@ccfiel
Copy link
Contributor

ccfiel commented Apr 3, 2020

Hello @andrey-ushakov we have created a PR that will allow the package to support USB. Hope you can review and merge. Thanks!

@wwandreww
Copy link
Owner

Hi @iRaySpace , @ccfiel ,

Thank you for your contribution! Unfortunately, I can't review and test it right now but for sure I will do that once I will get a USB printer!

@ibrahimlee
Copy link

@iRaySpace your writeBytes method doesn't work properly. I changed a few things and it worked for big tickets

` Future writeBytes(List bytes, {int chunkSizeBytes = 8192, int queueSleepTimeMs = 200,}) async {
final Completer completer = Completer();

final List<List<int>> chunks = [];

final len = bytes.length;

//check if total length is lower than chunkSize
if (bytes.length <= chunkSizeBytes) {
  chunks.add(bytes);
} else {
  for (var i = 0; i < len; i += chunkSizeBytes) {
    final end = (i + chunkSizeBytes < len) ? i + chunkSizeBytes : len;
    chunks.add(bytes.sublist(i, end));
  }
}

for (List<int> data in chunks) {
  await Escposprinter.printBytes(data);
  sleep(Duration(milliseconds: queueSleepTimeMs));
}

completer.complete(PosPrintResult.success);

await Escposprinter.closeConn;

return completer.future;

}`

@talhakhan1297
Copy link

talhakhan1297 commented Sep 25, 2020

@iRaySpace

I am getting this warning :

Note: C:\src\flutter\.pub-cache\git\esc-pos-printer-flutter-3dbaca068eac03e141745d6328758cc422c24bcb\android\src\main\java\br\com\samhaus\escposprinter\EscposprinterPlugin.java uses unchecked or unsafe operations.

@fanchou
Copy link

fanchou commented Jan 23, 2021

any update? test good for me.

@LucaDillenburg
Copy link

LucaDillenburg commented Mar 14, 2022

Does this work in the web or Windows? @iRaySpace @ccfiel

@iRaySpace
Copy link
Author

iRaySpace commented Mar 18, 2022

It is written only for Android. Other platforms were not taken into account. @LucaDillenburg

@EwertonDutra
Copy link

Does this work in the web or Windows? @iRaySpace @ccfiel

Hi,
In fact, on the web you will never have it for security reasons, your system does not have access to the printers, unless it shows the print screen before (never directly)

Now windows I'm on the search right now 😅😁

@SachinCodeMatrix
Copy link

Hi All,
Is there any posibility to use printer which is connected via USB in Windows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants