패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.0.3

flutter_esc_pos_network

이 라이브러리는 열식 Wi-Fi/이더넷 프린터를 사용하여 ESC/POS 명령을 통해 영수증을 인쇄할 수 있습니다.

AndroidiOSmacOSWindowsLinux
30일 다운로드
2.8천
좋아요
30
Pub 점수
130

패키지 설치

flutter pub add flutter_esc_pos_network

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Wi-Fi 또는 이더넷을 통해 연결된 열식 프린터에서 ESC/POS 명령을 사용하여 영수증 인쇄를 가능하게 하는 플러터 패키지입니다. 표준 ESC/POS 프로토콜을 사용하여 네트워크 프린터와 통신할 수 있게 하여 포인트 오브 세일 시스템 및 소매 애플리케이션에 적합합니다. 이 라이브러리는 안드로이드, iOS, 맥OS, 윈도우, 리눅스 등 여러 플랫폼을 지원하며 크로스플랫폼 호환성을 보장합니다. 개발자는 플러터 앱에서 직접 형식화된 텍스트, 바코드, 이미지를 프린터로 전송할 수 있습니다.

사용 사례

  • 포인트 오브 세일 시스템
  • 소매 영수증 인쇄
  • 레스토랑 주문 인쇄
  • 재고 관리
  • 이벤트 티켓 인쇄

주요 기능

  • 와이파이 및 이더넷 프린터 지원
  • ESC/POS 명령 호환성
  • 크로스 플랫폼 기능
  • 텍스트, 바코드 및 이미지 인쇄
  • Flutter 앱과의 간단한 통합

적합한 대상

  • 소매 개발자
  • POS 애플리케이션 제작자
  • 인쇄가 필요한 모바일 앱 개발자
  • 네트워크 연결된 열식 프린터를 사용하는 기업
  • IoT 기반 키오스크 솔루션

고려 사항

  • 호환되는 ESC/POS 프린터 필요
  • 네트워크 구성이 필요합니다
  • 프린터 IP 주소가 알려져야 합니다
  • 네트워크 연결 장치에 제한
  • 내장된 프린터 탐지 기능 없음

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

flutter_esc_pos_network

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, iOS, windows, Linux and MacOS 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: flutter_esc_pos_utils.

Print a Receipt

import 'package:flutter_esc_pos_network/flutter_esc_pos_network.dart';
final printer = PrinterNetworkManager('192.168.1.100');
    PosPrintResult connect = await printer.connect();
    if (connect == PosPrintResult.success) {
      PosPrintResult printing = await printer.printTicket(ticket);

      print(printing.msg);
      printer.disconnect();
    }
  }

For a complete example, check example/example.dart

카테고리

의존성

의존성 목록 1 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.