How to Print Bit Image TM-T88V
Hi guys, I have the following problem, I cannot print my bitmap without a white line every 24 lines. those. i need to print an image, but this image has white lines every 24 lines bit by bit.
The EPSON printer will print the image in the following format.
>line 23 01010101000010001010
>line 24 00001000100000000110
>line 25 --------- white line ------------
how to remove this damn white line?
Image size
width:400px
height:73px
while (offset < height)
{
//format ESC* Epson printer
String modIMG = new String(new byte[]{0x1B, 0x2A, 33, 0, 2});
img.append(modIMG);
for (int x = 0; x < width; ++x) {
for (int k = 0; k < 3; ++k) {
byte slice= 0;
for (int b = 0; b < 8; ++b) {
int y = (((offset / 8) + k) * 8) + b;
int i = (y * width) + x;
boolean v = false;
if (i < bitSet.length()) {
v = bitSet.get(i);}
slice |= (byte) ((v ? 1 : 0) << (7 - b));
}
img.slice(new String(new byte[] {slice}));
}
}
offset += 24;
img.append(new String(new String(new byte[]{0x1B,0x33,30}));
}
thanks and in advance!
source to share
So, I solved this problem. It is not enough to set the line spacing to 24 points with ESC '3' 24, but you need to print the image in page mode.
To enter page mode: ESC 'L'
Then you have to set the area of ββthe image with ESC 'W', here I am doing it in C:
h2 = h * 2 + 30;
/* Set the printing area, h * 2 because of double density */
seq[0] = 0x1b;
seq[1] = 'W';
seq[2] = 0; /* xl */
seq[3] = 0; /* xh */
seq[4] = 0; /* yl */
seq[5] = 0; /* yh */
seq[6] = 0; /* dxl */
seq[7] = 2; /* dxh */
seq[8] = h2 % 256; /* dyl */
seq[9] = h2 / 256; /* dyh */
if (write(fd, seq, 10) != 10)
goto finish;
Now send the image data and finally print with sending 0x0c, this will also return the printer to standard mode.
Using page mode, the white streaks in the image are gone.
By the way, this seems to be the weirdness of EPSON TM-T88 printers, I don't see those white lines on TM-T500A or Makes printers for example. On these printers, I can use Standard Mode to print images.
source to share
To confirm what other people suggested, I was able to remove the white lines between the data bars using " ESC30 ". You can see the actual (Haskell) code and results here .
source to share