network_pos_printer 0.1.6+2 copy "network_pos_printer: ^0.1.6+2" to clipboard
network_pos_printer: ^0.1.6+2 copied to clipboard

outdated

A library to send texts silently (with simple styles like underline, bold, justification, etc.) to a network ESC/POS printer (usually thermal)

example/main.dart

import 'package:network_pos_printer/network_pos_printer.dart';

main(List<String> arguments) {
  NetworkPOSPrinter.connect('192.168.81.80', 9100).then((printer) {
    printer.setBold(true);
    printer.writeLine('Test bold');

    printer.resetToDefault();

    printer.setInverse(true);
    printer.writeLine('Test inverse');

    printer.resetToDefault();

    printer.setUnderline(NetworkPOSPrinterUnderline.single);
    printer.writeLine('Test underline');

    printer.resetToDefault();

    printer.setJustification(NetworkPOSPrinterJustification.center);
    printer.writeLine('Test justification');

    // space blanks before cut
    for (int i = 0; i <= 5; i++) {
      printer.writeLine();
    }

    printer.cut();

    printer.close().then((v) {
      printer.destroy();
    });
  }).catchError((error) {
    print('error : $error');
  });
}
8
likes
0
pub points
51%
popularity

Publisher

unverified uploader

A library to send texts silently (with simple styles like underline, bold, justification, etc.) to a network ESC/POS printer (usually thermal)

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on network_pos_printer