EPOS Printing Special characters and Enable Cutter

I am wondering if anyone has printed to an Epson TM-60ii Printer. I have tried with the Epos version of the printer and can print simple strings via the ethernet comm handle but can not Change font via the printer control codes or enable the printer cutter. The printer will also do xml printing and have tried an app that will send xml code to it. it works on the app but when i use same code and tx it via comm handle it only prints the XML code.

Can you post the commands you are sending to the printer and how you are sending them?

Was Trying this Function from the Epos manual with escape codes

I am looking at setting up an easy xml webserver to be able to print via groov to the webserver and then it will transmit to printer. I found out you cannot xml directly to printer. But would rather print directly to Printer

            <Function B>	    	ASCII	    	GS	   	V	   	m	   	n
	Hex		                                         1D		56		m		n
	Decimal		                                29		86		m		n

[Range] m, n: different depending on the printers
[Default] None
[Description] Executes paper cutting specified by m, as follows:

Feeds paper and cuts the paper 65 Full cut
66 Partial cut

CommPrint = TransmitChar(29, epson);
CommPrint = TransmitChar(72, epson);
CommPrint = TransmitChar(2, epson);
CommPrint = TransmitString(Print40, epson);

Have you tried building the string to transmit, and then call transmit string one time? If I recall correctly, I have found that TransmitChar on IP will transmit immediately and not buffer.

BTW, your link requires a login.

1 Like

I’m not sure if this command is setup correctly, but here is how I would go about this:

//ESC and LF are string variables with 1 length. Setup for readability when building the full command
ESC = Chr(0x1b);
LF = Chr(0xa);
GS = Chr(0x1d);
NUL = Chr(0);

//Setup command to print a barcode and cut when done
//This is all assigned to Print 40

Print40 = ESC + "@"  //Initialize
  + GS + "H" + Chr(2)   //Set text to print below barcode
  + GS + "h" + Chr(100)  //Set barcode height - 100 dots
  + GS + "k" + Chr(4) + "Hello!" + NUL //Print CODE39 barcode 'Hello!'
  + GS + "V" + Chr(66) + Chr(0) //Feed to cutting posistion + 0 and partial cut
TransmitString(Print40, epson);

Thanks Phillip

Got me on the right Track, I was sending the “GS” incorrectly and now have it printing with font size and type changes, Barcodes and Cutting.


sorry for the old thread revival here.
I am trying to achieve some printing to a thermal epson via PAC.
Would I be able to build the command via opto script in a similar fashion?

I would think so.
Look up the manual for the Epson and find out the ‘special’ characters it needs.
Then use @philips example code to create those characters and you should be in the ballpark.

1 Like

I have it Running on a thermal Epson with control Code. I can Share what i have
It works for me

1 Like

Thank you very much for the offer, I eventually got it working :slight_smile: