What is the best way to print images and arabic on thermal bluetooth printer?

Hi guys
im trying to print arabic text to my bluetooth printer (thermal printer M:RPP300 {80mm} )
and because it dont support arabic letters i tried to print arabic as image that been captured from widget
and still have problems
when my widget height is more than 100 the printer wont print

Future _captureImage(GlobalKey<State> key) async {

try {

  RenderRepaintBoundary boundary = key.currentContext.findRenderObject();

  ui.Image image = await boundary.toImage();

  ByteData byteData =

      await image.toByteData(format: ui.ImageByteFormat.png);

  var png = byteData.buffer.asUint8List();

  im = png;

} catch (e) {




await _captureImage(_key);

                    if (im != null) {


                          MaterialPageRoute(builder: (_) => Print(im)));

                    } else {


                          context: context,

                          builder: (_) => AlertDialog(

                                content: Text("img Null"),



Future _ticket(PaperSize paper) async {

final ticket = Ticket(paper);

int total = 0;

final Uint8List bytes = widget.data.buffer.asUint8List();

final image = decodeImage(bytes);




  ' Printer Test',

  styles: PosStyles(

      align: PosAlign.center,

      height: PosTextSize.size2,

      width: PosTextSize.size2,

      codeTable: PosCodeTable.arabic),

  linesAfter: 1,


ticket.text('Thank You',

    styles: PosStyles(align: PosAlign.center, bold: true));

ticket.cut(mode: PosCutMode.full);


return ticket;


thanks …