All Projects → andrey-ushakov → Esc_pos_printer

andrey-ushakov / Esc_pos_printer

Licence: bsd-3-clause
ESC/POS (thermal, receipt) printing for Flutter & Dart

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to Esc pos printer

ESCPOS
A ESC/POS Printer Commands Helper
Stars: ✭ 26 (-82.43%)
Mutual labels:  printer, pos
chrome-raw-print
Chrome app to enable raw printing from a browser
Stars: ✭ 57 (-61.49%)
Mutual labels:  printer, pos
Luatos
合宙LuatOS -- Lua base RTOS, build for many embedded systems. LuatOS是运行在嵌入式硬件的实时操作系统
Stars: ✭ 124 (-16.22%)
Mutual labels:  wifi
Esp32 Projects
ESP32 好玩、有趣、实用的项目
Stars: ✭ 142 (-4.05%)
Mutual labels:  wifi
Sultan
Minimarket Point Of Sales (POS) software writen in C++ with Qt framework
Stars: ✭ 138 (-6.76%)
Mutual labels:  pos
Coffeefy
스타벅스 Wifi 자동접속 맥 애플리케이션
Stars: ✭ 128 (-13.51%)
Mutual labels:  wifi
Pifinger
📡🔍Searches for wifi-pineapple traces and calculate wireless network security score 🍍
Stars: ✭ 139 (-6.08%)
Mutual labels:  wifi
Ippsample
IPP sample implementations.
Stars: ✭ 123 (-16.89%)
Mutual labels:  printer
Raw Packet
Raw-packet Project
Stars: ✭ 144 (-2.7%)
Mutual labels:  wifi
Escpos Php
PHP library for printing to ESC/POS-compatible thermal and impact printers
Stars: ✭ 1,851 (+1150.68%)
Mutual labels:  printer
Ololog
A better console.log for the log-driven debugging junkies
Stars: ✭ 141 (-4.73%)
Mutual labels:  printer
Pdf To Printer
Print PDF files from Node.js and Electron.
Stars: ✭ 134 (-9.46%)
Mutual labels:  printer
Socketdemo
创建热点发送文件,让另一台手机连接热点接收文件
Stars: ✭ 129 (-12.84%)
Mutual labels:  wifi
Openwifi
open-source IEEE 802.11 WiFi baseband FPGA (chip) design
Stars: ✭ 2,257 (+1425%)
Mutual labels:  wifi
Esp wifimanager
This is an ESP32 / ESP8266 WiFi Connection Manager with fallback web configuration portal. Use this library for configuring ESP32, ESP8266 modules' WiFi, etc. Credentials at runtime. You can also specify static DNS servers, personalized HostName, fixed or random AP WiFi channel. With examples supporting ArduinoJson 6.0.0+ as well as 5.13.5- .
Stars: ✭ 125 (-15.54%)
Mutual labels:  wifi
Oxidtools
200 TOOLS BY 0XID4FF0X FOR TERMUX
Stars: ✭ 143 (-3.38%)
Mutual labels:  wifi
88x2bu
Linux Driver for USB WiFi Adapters that are based on the RTL8812BU and RTL8822BU Chipsets
Stars: ✭ 122 (-17.57%)
Mutual labels:  wifi
Goprowifihack
Unofficial GoPro WiFi API Documentation - HTTP GET requests for commands, status, livestreaming and media query.
Stars: ✭ 1,808 (+1121.62%)
Mutual labels:  wifi
Blinker Doc
blinker中文文档
Stars: ✭ 139 (-6.08%)
Mutual labels:  wifi
Wifi Bonding
Double your bandwith on your Qualcomm devices.
Stars: ✭ 145 (-2.03%)
Mutual labels:  wifi

esc_pos_printer

Pub Version

The library allows to print receipts using an ESC/POS thermal WiFi/Ethernet printer. For Bluetooth printers, use esc_pos_bluetooth library.

It can be used in Flutter or pure Dart projects. For Flutter projects, both Android and iOS are supported.

To scan for printers in your network, consider using 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

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 Receipt

Simple Receipt with Styles:

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

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

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

  printer.feed(2);
  printer.cut();
}

You can find more examples here: esc_pos_utils.

Print a Receipt

import 'package:esc_pos_printer/esc_pos_printer.dart';

const PaperSize paper = PaperSize.mm80;
final profile = await CapabilityProfile.load();
final printer = NetworkPrinter(paper, profile);

final PosPrintResult res = await printer.connect('192.168.0.123', port: 9100);

if (res == PosPrintResult.success) {
  testReceipt(printer);
  printer.disconnect();
}

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

For a complete example, check example/example.dart and example/discover_printers.

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].