DantSu / ESCPOS-ThermalPrinter-Android

Useful library to help Android developpers to print with (Bluetooth, TCP, USB) ESC/POS thermal printer.
MIT License
1.22k stars 367 forks source link

image alignment issue #487

Open saiyadamreddy opened 9 months ago

saiyadamreddy commented 9 months ago

Hello,

I am using below syntax for printing image. I tried both bitmap and image resource printing both images right side. I tried [L] and [C] both tag printing right side only. please let me know I need to add any thing else.

val printer = EscPosPrinter(BluetoothPrintersConnections.selectFirstPaired(), 203, 48f, 32) printer.printFormattedText( "[C]" + PrinterTextParserImg.bitmapToHexadecimalString(printer, this.applicationContext.resources.getDrawableForDensity(R.drawable.appicon, DisplayMetrics.DENSITY_MEDIUM))+"\n"

Screenshot_20240106-181849_Gallery

DantSu commented 9 months ago

Your printer is 48mm 203 dpi ?

saiyadamreddy commented 9 months ago

Your printer is 48mm 203 dpi ?

Yes.. other text content is printing fine.

vikrammani-t2s commented 9 months ago

can you change 72f

Asima007 commented 2 months ago

Is this issue fixeed? Facing same issue 72f not working How to fix?

Asima007 commented 2 months ago

Your printer is 48mm 203 dpi ?

Yes.. other text content is printing fine.

Is it fixed?