Closed Aashir1111 closed 3 years ago
@DantSu i have the same problem, can you check it??
I can't reproduce your problem, can't help you, you have to find the solution by yourself
Write here the solution when you find it.
I found the solution the problem was my bitmaps width was too large and I resized it
val width = (printerDPI / 25.4 * printerWidth) // printeraWidth 58mm , 80mm ...
val ratio = bitmap.width * 1.0 / width
val height = bitmap.height / ratio
val finalBitmap = Bitmap.createScaledBitmap(bitmap, width.toInt(), height.toInt(), false)
generate HexString is: "[C]1d7630004700790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...........0000000000000000\n[C]Printed!!!\n"