1

I want to create a Bitmap with some string data on it, and later send it to my mobile printer.

How can we do that?

Phantômaxx
  • 37,352
  • 21
  • 80
  • 110
Muayad Salah
  • 651
  • 1
  • 8
  • 19

1 Answers1

2

try like this:

Bitmap resultBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(resultBitmap);
Paint paint = new Paint();
paint.setColor(Color.RED);
canvas.drawText("", 10, 10, paint);
//here you can return that bitmap directly
Bartek Lipinski
  • 29,328
  • 10
  • 89
  • 127
Rathan Kumar
  • 2,656
  • 2
  • 16
  • 24