@@ -8,31 +8,32 @@ It can be used in [Flutter](https://flutter.dev/) or pure [Dart](https://dart.de
...
@@ -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.
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!)
## 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
## 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
## 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
## Generate a Ticket
### Simple Ticket with Styles:
### Simple Ticket with Styles:
```dart
```dart
TickettestTicket(){
TickettestTicket(){
finalTicketticket=Ticket(PaperSize.mm80);
// Using default profile
finalprofile=awaitCapabilityProfile.load();
finalTicketticket=Ticket(PaperSize.mm80,profile);
ticket.text(
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');
'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() {
...
@@ -64,7 +65,6 @@ Ticket testTicket() {
You can find more examples here: [esc_pos_utils](https://github.com/andrey-ushakov/esc_pos_utils).
You can find more examples here: [esc_pos_utils](https://github.com/andrey-ushakov/esc_pos_utils).
## Print a Ticket
## Print a Ticket
```dart
```dart
...
@@ -76,10 +76,11 @@ final PosPrintResult res = await printerManager.printTicket(testTicket());
...
@@ -76,10 +76,11 @@ final PosPrintResult res = await printerManager.printTicket(testTicket());
print('Print result: ${res.msg}');
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`.