Epson command

duf

Joined
Oct 12, 2011
Messages
4
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:
Code:
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);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top