I am trying to decrease font size for printing but unable to do this I have used this for small font size
val FONT_SMALL = byteArrayOf(0x1B, 0x21, 0x001)
But I want decrease more font size
I am trying to decrease font size for printing but unable to do this I have used this for small font size
val FONT_SMALL = byteArrayOf(0x1B, 0x21, 0x001)
But I want decrease more font size
It depends on the vendor and model of printer you are using.
For example, for EPSON, specifying Font C with the following command will result in a smaller font.
But whether it is supported or not depends on the printer model.
In response to comment:
This is a command that changes the printer font for subsequent prints.
After sending this command, if you send the character string data you want to print, it will be printed with the changed font size.
It depends on the API of the device. I also could not change the font size of the text of the receipt-printing POS device.
The device that I had did use JNI with some binary files for printing. So, the only solution was to decompile them but this method could take a lot of time so I decided not to go this way.
The device also could print bitmaps, so I created a bitmap with the text that I need and this solved my problem.
To create a bitmap with text on it these answers can be helpful.