esc_pos_utils icon indicating copy to clipboard operation
esc_pos_utils copied to clipboard

QR is printed twice and textEncoded could not align to center, how to decrease the large space come between text encoded words

Open mustafa2011 opened this issue 3 years ago • 4 comments

import 'package:bluetooth_thermal_printer/bluetooth_thermal_printer.dart';
import 'package:esc_pos_utils_plus/esc_pos_utils.dart';

Future<List<int>> getTicket() async {
    List<int> bytes = [];
    CapabilityProfile profile = await CapabilityProfile.load();
    final generator = Generator(PaperSize.mm58, profile);
    const characterSet = 'CP1256';

   Uint8List encSeller = await CharsetConverter.encode(characterSet, "النجم السادس");
   bytes += generator.hr(ch: '=', linesAfter: 1);
   bytes += generator.qrcode("www.google.com", size: QRSize.Size8);
   bytes += generator.textEncoded(encSeller,
        styles: const PosStyles(
          height: PosTextSize.size2,
          width: PosTextSize.size2,
          align: PosAlign.center,
          bold: true,
        ));
    bytes += generator.text("${Utils.formatDate(DateTime.now())}",
        styles: const PosStyles(align: PosAlign.center), linesAfter: 1);

    bytes += generator.cut();
    return bytes;
  }

// I'm using IposPrinter thermal POS printer

img

mustafa2011 avatar Mar 04 '22 11:03 mustafa2011

How did you get the correct arabic text ? we are using epson printer ,arabic not printing correctly with encoding

iyashiyas avatar May 24 '22 13:05 iyashiyas

Connect me whatsApp 00966502300618

On Tue, May 24, 2022, 4:30 PM Shiyas @.***> wrote:

How did you get the correct arabic text ? we are using epson printer ,arabic not printing correctly with encoding

— Reply to this email directly, view it on GitHub https://github.com/andrey-ushakov/esc_pos_utils/issues/70#issuecomment-1135927744, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABY5BME6BYY6TBQL4JUWYYDVLTKYXANCNFSM5P5LB4QQ . You are receiving this because you authored the thread.Message ID: @.***>

mustafa2011 avatar May 24 '22 14:05 mustafa2011

I have the same issue with this plugin.

@mustafa2011 did you manage to find any work around for this issue?

bashiryousufy avatar Jul 23 '22 10:07 bashiryousufy

No, I didn't.

On Sat, Jul 23, 2022, 1:14 PM bashir yousufy @.***> wrote:

I have the same issue with this plugin.

@mustafa2011 https://github.com/mustafa2011 did you manage to find any work around for this issue?

— Reply to this email directly, view it on GitHub https://github.com/andrey-ushakov/esc_pos_utils/issues/70#issuecomment-1193100770, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABY5BMD6VOJ3OYUZRGRG6VLVVPAZLANCNFSM5P5LB4QQ . You are receiving this because you were mentioned.Message ID: @.***>

mustafa2011 avatar Jul 23 '22 17:07 mustafa2011