pos_printer_kit_khmer 1.0.9 copy "pos_printer_kit_khmer: ^1.0.9" to clipboard
pos_printer_kit_khmer: ^1.0.9 copied to clipboard

A Flutter library for printing receipts in Khmer using ESC/POS-compatible thermal printers.

๐Ÿงพ POS Printer Kit Khmer #

A Flutter plugin to print Khmer invoices on ESC/POS network thermal printers. This package allows:

โœ… Khmer Unicode Text
โœ… Receipt as Image
โœ… Custom Layout Screenshot Printing
โœ… Full-width support for 80mm paper


๐Ÿš€ Features #

  • Print Khmer text using a custom font
  • Render invoice layout as image
  • Print from screenshot
  • Easily connect to printer via IP and port

๐Ÿ›  Installation #

Add to your pubspec.yaml:

pos_printer_kit_khmer: ^1.0.0

๐Ÿ“ฆ Usage #

Import and Connect #

import 'package:pos_printer_kit_khmer/pos_printer_kit_khmer.dart';

final PrinterService printerService = PrinterService();

  @override
  void initState() {
    super.initState();
    _connectToPrinter();
  }

  Future<void> _connectToPrinter() async {
    
    const String ip = '192.168.0.100'; // your printer ip for eg. 168.10.10.0
    const int port = 9100;
    printerService.setConnection(ip: ip, port: port); // Replace with your actual IP
  } // Replace with your actual IP

โœ… Khmer Unicode Text #


await printerService.printKhmerRawText([
  'แžœแžทแž€แŸ’แž€แž™แž”แžแŸ’แžš INV-001',
  'แžขแžแžทแžแžทแž‡แž“: แž›แŸ„แž€ แž…แžถแž“แŸ‹แžŠแžถแžšแŸ‰แžถ',
  'แžŸแžšแžปแž”: \$10.00',
  'แžŸแžผแž˜แžขแžšแž‚แžปแžŽ!',
]);

โœ… Receipt as Image #


await printerService.printKhmerTextAsImage('แžœแžทแž€แŸ’แž€แž™แž”แžแŸ’แžš: INV-0001');

โœ… Full-width support for 80mm paper #


await printerService.printInvoiceImage(
  title: 'COMPANY NAME CO., LTD.',
  customer: 'แž›แŸ„แž€ แž…แžถแž“แŸ‹แžŠแžถแžšแŸ‰แžถ',
  invoiceNo: 'INV-001',
  dateTime: DateTime.now(),
  items: [
    InvoiceItem(name: 'แž€แžถแž แŸ’แžœแŸแž€แŸ’แžšแž แž˜', qty: 1, price: 2.0),
    InvoiceItem(name: 'แž“แŸ†แžแŸแž€', qty: 2, price: 4.0),
    InvoiceItem(name: 'แž‘แžนแž€แž•แŸ’แž›แŸ‚แžˆแžพ', qty: 1, price: 1.5),
  ],
  discount: 0.5,
  paymentMethod: 'แžŸแžถแž…แŸ‹แž”แŸ’แžšแžถแž€แŸ‹',
);

โœ… Custom Layout Screenshot Printing #

final GlobalKey captureKey = GlobalKey();

RepaintBoundary(
  key: captureKey,
  child: YourInvoiceWidget(),
);

await printerService.printFromScreenshot(captureKey);

1
likes
130
points
15
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter library for printing receipts in Khmer using ESC/POS-compatible thermal printers.

Homepage

Documentation

API reference

License

unknown (license)

Dependencies

esc_pos_printer, esc_pos_utils, flutter, image

More

Packages that depend on pos_printer_kit_khmer