andrey-ushakov / esc_pos_printer

ESC/POS (thermal, receipt) printing for Flutter & Dart
BSD 3-Clause "New" or "Revised" License
346 stars 298 forks source link

print bug #149

Open shema-ryan opened 2 years ago

shema-ryan commented 2 years ago

PLATFORM : WINDOWS APPLICATION Have been able to print first few receipt using an Ethernet cable but the fifth is always printed in halves . have to followed your example but still wasn't successfully.

RizaldiWiratama commented 2 years ago

Hey @shema-ryan i appear to have same issue with you, and then when i change the code to use generator. from esc_pos_utils (instead using printer. every command) and then after that call printer.rawBytes(bytes) like this example

List<int> bytes = [];
bytes += generator.text("Test", styles: const PosStyles(align: PosAlign.center), linesAfter: 2);
bytes += generator.text("Test 2", styles: const PosStyles(align: PosAlign.center), linesAfter: 2);
bytes += generator.cut();
printer.rawBytes(bytes);

there is no random stop again after using this workaround