EPOS Printing Special characters and Enable Cutter


#1

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.


#2

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


#3

Was Trying this Function from the Epos manual with escape codes
https://reference.epson-biz.com/modules/ref_escpos/index.php?content_id=87

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


#4

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


#5

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.


#6

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);

#7

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.

Dave