Print ESC/POS 'codebar'

100 Views Asked by At

Hi I need to print barcodes on thermal printers (e.g. EPSON TMT20) vertically using ESC/POS commands, today I can print them horizontally using the following commands.

new Indice = 1 // ===========PRINT BAR CODE ============= // xSerialSendByte (SERIAL_CH,0x1D)              //GS xSerialSendByte (SERIAL_CH,'f') //f xSerialSendByte (SERIAL_CH,3) //Select fon

xSerialSendByte (SERIAL_CH,0x1D) //GS
xSerialSendByte (SERIAL_CH,'H') //H
xSerialSendByte (SERIAL_CH,0) //Select print position

xSerialSendByte (SERIAL_CH,0x1D) //GS
xSerialSendByte (SERIAL_CH,'w') //w
xSerialSendByte (SERIAL_CH,SizeCodeBar) //Set width size to 3t

xSerialSendByte (SERIAL_CH,0x1D) //GS
xSerialSendByte (SERIAL_CH,'h') //h
xSerialSendByte (SERIAL_CH,180) //Set height

xSerialSendByte (SERIAL_CH,0x1D) //GS
xSerialSendByte (SERIAL_CH,'k') //k
xSerialSendByte (SERIAL_CH,2) //Print bar code  

for (Indice = 2; Indice < 14; Indice++) 
{
    xSerialSendByte (SERIAL_CH,Num[Indice])
}

xSerialSendByte (SERIAL_CH,0)//Terminador
0

There are 0 best solutions below