ekasetiawans / flutter_bluetooth_printer_plugin

MIT License
26 stars 53 forks source link

Auto Cut #56

Open hiruworld opened 1 month ago

hiruworld commented 1 month ago

Does anyone know how to use auto cut paper after printing from this package? Highly appreciate it if anyone can let me know.

hiruworld commented 1 month ago

I managed to solve it. Posting here if anyone looking for an answer.

List<int> intList = [0x1D, 0x56, 0x00];

Uint8List cutCommand = Uint8List.fromList(intList);

FlutterBluetoothPrinter.printBytes(address: widget.device, data: cutCommand, keepConnected: true);

await FlutterBluetoothPrinter.disconnect(widget.device);

You can do this before disconnect from printer.