Commit ddc18142 authored by andrey's avatar andrey

Updated example and README (using CapabilityProfiles)

parent 487a395f
## [3.2.5]
- Updated example and README (using CapabilityProfiles)
- Bump esc_pos_utils
## [3.2.4]
- Bump esc_pos_utils
......
......@@ -8,31 +8,32 @@ It can be used in [Flutter](https://flutter.dev/) or pure [Dart](https://dart.de
To scan for printers in your network, 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.
## TODO (PRs are welcomed!)
* Print QR Codes using the `GS ( k` command (printing QR code from an image already supported)
* PDF-417 Barcodes using the `GS ( k` command
* Line spacing using the `ESC 3 <n>` command
- Print QR Codes using the `GS ( k` command (printing QR code from an image already supported)
- PDF-417 Barcodes using the `GS ( k` command
- Line spacing using the `ESC 3 <n>` command
## How to Help
* Test your printer and add it in the table: [Wifi/Network printer](https://github.com/andrey-ushakov/esc_pos_printer/blob/master/printers.md) or [Bluetooth printer](https://github.com/andrey-ushakov/esc_pos_bluetooth/blob/master/printers.md)
* Test and report bugs
* Share your ideas about what could be improved (code optimization, new features...)
* PRs are welcomed!
- Test your printer and add it in the table: [Wifi/Network printer](https://github.com/andrey-ushakov/esc_pos_printer/blob/master/printers.md) or [Bluetooth printer](https://github.com/andrey-ushakov/esc_pos_bluetooth/blob/master/printers.md)
- Test and report bugs
- Share your ideas about what could be improved (code optimization, new features...)
- PRs are welcomed!
## Tested Printers
Here are some [printers tested with this library](printers.md). Please add the models you have tested to maintain and improve this library and help others to choose the right printer.
Here are some [printers tested with this library](printers.md). Please add the models you have tested to maintain and improve this library and help others to choose the right printer.
## Generate a Ticket
### Simple Ticket with Styles:
```dart
Ticket testTicket() {
final Ticket ticket = Ticket(PaperSize.mm80);
// Using default profile
final profile = await CapabilityProfile.load();
final Ticket ticket = Ticket(PaperSize.mm80, profile);
ticket.text(
'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');
......@@ -64,7 +65,6 @@ Ticket testTicket() {
You can find more examples here: [esc_pos_utils](https://github.com/andrey-ushakov/esc_pos_utils).
## Print a Ticket
```dart
......@@ -76,10 +76,11 @@ final PosPrintResult res = await printerManager.printTicket(testTicket());
print('Print result: ${res.msg}');
```
For a complete example, check `example/example.dart` and `example/discover_printers`.
For a complete example, check `example/example.dart` and `example/discover_printers`.
## Test Print
<img src="https://github.com/andrey-ushakov/esc_pos_printer/blob/master/example/receipt2.jpg?raw=true" alt="test receipt" height="800"/>
<img src="https://github.com/andrey-ushakov/esc_pos_printer/blob/master/example/receipt.jpg?raw=true" alt="test receipt" height="500"/>
......@@ -18,7 +18,7 @@ dependencies:
intl: ^0.16.1
qr_flutter: ^3.2.0
path_provider: ^1.6.5
esc_pos_utils: ^0.4.4
esc_pos_utils: ^0.4.5
# esc_pos_utils:
# path: ../../../esc_pos_utils
charset_converter: ^1.0.3
......
name: esc_pos_printer
description: The library allows to print receipts using an ESC/POS thermal WiFi printer.
version: 3.2.4
version: 3.2.5
homepage: https://github.com/andrey-ushakov/esc_pos_printer
environment:
......@@ -9,7 +9,7 @@ environment:
dependencies:
flutter:
sdk: flutter
esc_pos_utils: ^0.4.4
esc_pos_utils: ^0.4.5
# esc_pos_utils:
# path: ../esc_pos_utils
charset_converter: ^1.0.3
......
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