What is the right code that prints text at a specific position. There are the Epson commands in the section on horizontal position three instructions: Print Position, Execute current print position from left margin and Set print position. I can not deal with sending commands and I do it this way:
LPBYTE cSendBuf = NULL;
int textSize = 9;
cSendBuf = (LPBYTE) malloc ( textSize*sizeof(BYTE) );
cSendBuf[0] = 0x18; //clear print buffer
cSendBuf[1] = 0x1B; // Set left margin
cSendBuf[2] = 0x6C;
cSendBuf[3] = 0x1;
cSendBuf[4] = 0x1B; // Print position, it doesn`t work
cSendBuf[5] = 0x5C;
cSendBuf[6] = 0x40;
cSendBuf[7] = 0x14;
cSendBuf[8] = 'T';
if( !RawDataToPrinter( L"\\\\AGO\\Oki ML 520 Elite (IBM)", cSendBuf, textSize ) ) ShowMessage("Error");
free(cSendBuf);
LPBYTE cSendBuf = NULL;
int textSize = 9;
cSendBuf = (LPBYTE) malloc ( textSize*sizeof(BYTE) );
cSendBuf[0] = 0x18; //clear print buffer
cSendBuf[1] = 0x1B; // Set left margin
cSendBuf[2] = 0x6C;
cSendBuf[3] = 0x1;
cSendBuf[4] = 0x1B; // Print position, it doesn`t work
cSendBuf[5] = 0x5C;
cSendBuf[6] = 0x40;
cSendBuf[7] = 0x14;
cSendBuf[8] = 'T';
if( !RawDataToPrinter( L"\\\\AGO\\Oki ML 520 Elite (IBM)", cSendBuf, textSize ) ) ShowMessage("Error");
free(cSendBuf);