Commit 1f1f7de7 authored by Andrey's avatar Andrey

Added readme

parent b7aa7b2c
## [0.9.0] ## [0.9.0]
* Initial release. * Initial release
* Added basic functions (cut paper, write line, ...) * Added basic functions (cut paper, write line, ...)
* Text styling (bold, underline, reverted, ...) * Text styling (bold, underline, reverted, ...)
* Text align * Text align
* Table row printing (up to 12 columns) * Table row printing (up to 12 columns of different width)
\ No newline at end of file \ No newline at end of file
# esc_pos_printer # esc_pos_printer
A new Flutter package project. The library allows to print receipts using a ESC/POS (usually thermal) network printer.
It can be used in [Flutter](https://flutter.dev/) or [Dart](https://dart.dev/) projects. In Flutter, both Android and iOS are supported.
## 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
* Paper cut (partial, full)
* Beeping (with different duration)
* Paper feed, 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 ## Getting Started
This project is a starting point for a Dart ```dart
[package](https://flutter.dev/developing-packages/), import 'package:esc_pos_printer/esc_pos_printer.dart';
a library module containing code that can be shared easily across
multiple Flutter or Dart projects. Printer.connect('192.168.0.123').then((printer) {
printer.println(PosString('Normal text'));
printer.println(PosString('Bold text', bold: true));
printer.println(PosString('Reverse text', reverse: true));
printer.println(PosString('Underlined text', underline: true));
printer.println(PosString('Align center', align: PosTextAlign.center));
printer.printRow([3, 6, 3],
[
PosString('col3'),
PosString('col6'),
PosString('col3', underline: true)
],
);
printer.println(PosString('Text size 200%',
height: PosTextSize.size2, width: PosTextSize.size2));
printer.cut();
printer.disconnect();
});
```
For help getting started with Flutter, view our ## TODO
[online documentation](https://flutter.dev/docs), which offers tutorials, * Add raw print function
samples, guidance on mobile development, and a full API reference. * Print images
* Print barcodes
* Print QR codes
* Example project for Flutter (print a receipt template)
* Turn 90° clockwise rotation mode on/off
* Discover active Wi-Fi printers
\ No newline at end of file
import 'package:esc_pos_printer/esc_pos_printer.dart'; import 'package:esc_pos_printer/esc_pos_printer.dart';
import 'package:esc_pos_printer/src/printer.dart';
void main() { void main() {
Printer.connect('192.168.0.123').then((printer) { Printer.connect('192.168.0.123').then((printer) {
......
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