All Projects → andrey-ushakov → esc_pos_bluetooth

andrey-ushakov / esc_pos_bluetooth

Licence: BSD-3-Clause license
ESC/POS (thermal, receipt) printing for Flutter & Dart (Android/iOS)

Programming Languages

dart
5743 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to esc pos bluetooth

ESCPOS
A ESC/POS Printer Commands Helper
Stars: ✭ 26 (-85.31%)
Mutual labels:  receipt, pos, esc
chrome-raw-print
Chrome app to enable raw printing from a browser
Stars: ✭ 57 (-67.8%)
Mutual labels:  receipt, pos
escpos-tools
Utilities to read ESC/POS print data
Stars: ✭ 145 (-18.08%)
Mutual labels:  receipt, pos
escpos-coffee
Java library for ESC/POS printer
Stars: ✭ 172 (-2.82%)
Mutual labels:  receipt-printer, thermal-printer
receipt parser
Allow parsing Russian receipts
Stars: ✭ 47 (-73.45%)
Mutual labels:  receipt
DYFStoreKit
([Swift] https://github.com/chenxing640/DYFStore) A lightweight and easy-to-use iOS library for In-App Purchases (Objective-C). DYFStoreKit uses blocks and notifications to wrap StoreKit, provides receipt verification and transaction persistence and doesn't require any external dependencies.
Stars: ✭ 52 (-70.62%)
Mutual labels:  receipt
receipt-parser-server
Receipt parser server written in python.
Stars: ✭ 64 (-63.84%)
Mutual labels:  receipt
receipt-manager-webapp
Receipt parser webapplication written in javascript and python.
Stars: ✭ 37 (-79.1%)
Mutual labels:  receipt
react-native-thermal-receipt-printer-image-qr
React native thermal receipt printer
Stars: ✭ 71 (-59.89%)
Mutual labels:  thermal-printer
receipt-manager-app
Receipt parser application written in dart.
Stars: ✭ 140 (-20.9%)
Mutual labels:  receipt
Manta
🎉 Flexible invoicing desktop app with beautiful & customizable templates.
Stars: ✭ 5,160 (+2815.25%)
Mutual labels:  receipt
apple-receipt
Apple InAppPurchase Receipt - Models, Parser, Validator
Stars: ✭ 25 (-85.88%)
Mutual labels:  receipt
bizbook-server
The repository of bizbook server web api project
Stars: ✭ 45 (-74.58%)
Mutual labels:  pos
POS---Point-Of-Sales
Point of sales proof of concept developed using Asp.Net Core 2.2. Features: Customer, Vendor, Product, Purchase Order, Goods Receive, Sales Order, Inventory Transactions and POS form.
Stars: ✭ 120 (-32.2%)
Mutual labels:  pos
ReceiptQuickLook
A QuickLook plugin to inspect App Store receipts.
Stars: ✭ 35 (-80.23%)
Mutual labels:  receipt
pos
Point of sale system targeted towards pharmacies in India.
Stars: ✭ 46 (-74.01%)
Mutual labels:  pos
payantNG-php
PHP Library for PayantNG
Stars: ✭ 14 (-92.09%)
Mutual labels:  receipt
Url To Pdf Api
Web page PDF/PNG rendering done right. Self-hosted service for rendering receipts, invoices, or any content.
Stars: ✭ 6,544 (+3597.18%)
Mutual labels:  receipt
matic-docs
The official documentation for all Polygon products.
Stars: ✭ 181 (+2.26%)
Mutual labels:  pos
ionic-escpos-bluetooth-printer-sample
Sample use of ionic 3 with a bluetooth esc/pos thermal printer
Stars: ✭ 40 (-77.4%)
Mutual labels:  bluetooth-printer

esc_pos_bluetooth

Pub Version

The library allows to print receipts using a Bluetooth printer. For WiFi/Ethernet printers, use esc_pos_printer library.

TODO (PRs are welcomed!)

  • Split byte data into chunks: issue
  • 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 or Bluetooth printer
  • 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. 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:

Ticket testTicket() {
  final Ticket ticket = Ticket(PaperSize.mm80);

  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');
  ticket.text('Special 1: àÀ èÈ éÉ ûÛ üÜ çÇ ôÔ',
      styles: PosStyles(codeTable: PosCodeTable.westEur));
  ticket.text('Special 2: blåbærgrød',
      styles: PosStyles(codeTable: PosCodeTable.westEur));

  ticket.text('Bold text', styles: PosStyles(bold: true));
  ticket.text('Reverse text', styles: PosStyles(reverse: true));
  ticket.text('Underlined text',
      styles: PosStyles(underline: true), linesAfter: 1);
  ticket.text('Align left', styles: PosStyles(align: PosAlign.left));
  ticket.text('Align center', styles: PosStyles(align: PosAlign.center));
  ticket.text('Align right',
      styles: PosStyles(align: PosAlign.right), linesAfter: 1);

  ticket.text('Text size 200%',
      styles: PosStyles(
        height: PosTextSize.size2,
        width: PosTextSize.size2,
      ));

  ticket.feed(2);
  ticket.cut();
  return ticket;
}

You can find more examples here: esc_pos_utils.

Print a Ticket

PrinterBluetoothManager printerManager = PrinterBluetoothManager();

printerManager.scanResults.listen((printers) async {
  // store found printers
});
printerManager.startScan(Duration(seconds: 4));

// ...

printerManager.selectPrinter(printer);
final PosPrintResult res = await printerManager.printTicket(testTicket());

print('Print result: ${res.msg}');

For a complete example, check the demo project example/blue.

Troubleshooting

  • If your printer prints only 5%-10% of an image and then stops, or it can't print more than 1 image on the same ticket, or it can't print long tickets, try to ajust queueSleepTimeMs of the PrinterBluetoothManager.printTicket (try 50 or 100ms): printerManager.printTicket(await demoReceipt(paper), queueSleepTimeMs: 50);

Test Print

test receipt

test receipt

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].