Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we print Marathi language text using esc_pos_printer #189

Open
MohsinP07 opened this issue Oct 7, 2023 · 1 comment
Open

Can we print Marathi language text using esc_pos_printer #189

MohsinP07 opened this issue Oct 7, 2023 · 1 comment

Comments

@MohsinP07
Copy link

Hii, In my project i want to print the text in Marathi Language is it possible.
Here is my code
Future printMarathiText() async {
final profile = await CapabilityProfile.load();
final printer = NetworkPrinter(PaperSize.mm80, profile);
List bytes = [];
final generator = Generator(PaperSize.mm80, profile);
await connectToPrinter();

bytes += generator.text('मराठी मध्ये टेक्स्ट प्रिंट करणारा प्रिंटर',
    styles: const PosStyles(
      align: PosAlign.center,
      height: PosTextSize.size1,
      width: PosTextSize.size1,
    ),
    linesAfter: 1);

// printer.text('मराठी मध्ये टेक्स्ट प्रिंट करणारा प्रिंटर');

printer.cut();
printer.disconnect();

}
i am getting error as ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument (string): Contains invalid characters.: "मराठी मध्ये टेक् स्ट प्रिंट करणारा प्रिंटर" .
Is there an solution for this?

@abdullatheeftk-gulf
Copy link

first convert text to image either by flutter or native code by mrthod channel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants