1

I am printing image below via Bluetooth printer.

enter image description here

I m referring this link link for printing. image size is 100 x 100 px and image mode is

public static byte[] SELECT_BIT_IMAGE_MODE = {0x1B, 0x2A, 33, (byte)255, 0};

but somehow it appears as image . ive tried some options given in comments but its not working.

can anybody help me out?thanks in advance

ganesh101
  • 93
  • 2
  • 9

2 Answers2

1

You can use printooth library for any printer, printooth is simple and well documented, https://github.com/mazenrashed/Printooth

var printables = ArrayList<Printable>()
var printable = Printable.PrintableBuilder()  
    .setImage(image) 
    .setNewLinesAfter(1) // To provide n lines after sentence
    .build()
printables.add(printable)
BluetoothPrinter.printer().print(printables)
Mazen Rashed
  • 139
  • 1
  • 3
0

Ok working with this.

used 130x130 px image with single mService.write(PrinterCommands.FEED_LINE);

and image mode is public static byte[] SELECT_BIT_IMAGE_MODE = {0x1B, 0x2A, 33, (byte)255, 0};

Reference - post

Output image is

enter image description here

ganesh101
  • 93
  • 2
  • 9