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,901
  • 21
  • 84
  • 115
Muayad Salah
  • 701
  • 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
  • 30,698
  • 10
  • 94
  • 132
Rathan Kumar
  • 2,567
  • 2
  • 17
  • 24