Commit d5f0ba0a authored by Andrey's avatar Andrey

Readme updated. Added barcode commands

parent 5a37a444
......@@ -9,20 +9,21 @@ The library allows to print receipts using a ESC/POS (usually thermal) network p
It can be used in [Flutter](https://flutter.dev/) or [Dart](https://dart.dev/) projects. In Flutter, both Android and iOS are supported.
To discover existing printers in your subnet, consider using [ping_discover_network](https://pub.dev/packages/ping_discover_network) package. Note that most of ESC/POS printers by default listen on port 9100.
To discover existing printers in your subnet, consider using [ping_discover_network](https://pub.dev/packages/ping_discover_network) package. Note that most of the ESC/POS printers by default listen on port 9100.
## Features
## Main Features
* Connect to Wi-Fi printers
* Simple text printing using *println* method
* Tables printing using *printRow* method
* Text styling:
* size, align, bold, reverse, underline, different fonts
* size, align, bold, reverse, underline, different fonts, turn 90°
* Print images
* Paper cut (partial, full)
* Beeping (with different duration)
* Paper feed, reverse feed
**Note**: Your printer may not support some of presented features (especially for underline styles, partial/full paper cutting, reverse feed, ...).
**Note**: Your printer may not support some of the presented features (especially for underline styles, partial/full paper cutting, reverse feed, ...).
## Getting Started
......@@ -31,12 +32,16 @@ import 'package:esc_pos_printer/esc_pos_printer.dart';
Printer.connect('192.168.0.123', port: 9100).then((printer) {
printer.println('Regular: aA bB cC dD eE fF gG hH iI jJ kK lL mM nN oO pP qQ rR sS tT uU vV wW xX yY zZ');
printer.println('Special: àÀ èÈ éÉ ûÛ üÜ çÇ ôÔ',
printer.println('Special 1: àÀ èÈ éÉ ûÛ üÜ çÇ ôÔ',
styles: PosStyles(codeTable: PosCodeTable.westEur));
printer.println('Special 2: blåbærgrød',
styles: PosStyles(codeTable: PosCodeTable.westEur));
printer.println('Bold text', styles: PosStyles(bold: true));
printer.println('Reverse text', styles: PosStyles(reverse: true));
printer.println('Underlined text',
styles: PosStyles(underline: true), linesAfter: 1);
printer.println('Align left', styles: PosStyles(align: PosTextAlign.left));
printer.println('Align center',
styles: PosStyles(align: PosTextAlign.center));
......@@ -84,7 +89,10 @@ import 'package:image/image.dart';
const String filename = './logo.png';
final Image image = decodeImage(File(filename).readAsBytesSync());
// Using (ESC *) command
printer.printImage(image);
// Using an alternative obsolette (GS v 0) command
printer.printImageRaster(image);
```
## TODO
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment