0

I have a problem sending the print logo command to my Epson tm-t70 printer in C#.net

I have searched the web and I came up with a lot of cryptic stuff. Most useful being that I will need to send the following command:

[Name] Print the specified NV graphics data.

[Format] ASCII GS ( L pL pH m fn kc1 kc2 x y

Hex 1D 28 4C 06 00 30 45 kc1 kc2 x y

Decimal 29 40 76 6 0 48 69 kc1 kc2 x y

[Range] (pL + pH × 256) = 6 (pL = 6, pH = 0)

m = 48

fn = 69

32 ≤ kc1 ≤ 126

32 ≤ kc2 ≤ 126

I have no idea how to initiate this command in C# and the documentation did not help much.

halfer
  • 19,824
  • 17
  • 99
  • 186
Paul Plato
  • 1,471
  • 6
  • 28
  • 36
  • Have a look at [this blog post](http://nicholas.piasecki.name/blog/2009/12/sending-a-bit-image-to-an-epson-tm-t88iii-receipt-printer-using-c-and-escpos/) by Nicholas Piasecki. – stukelly Mar 26 '13 at 21:46

1 Answers1

2

Well the following code solved it. Figured it out thanks to @stukelly

string GS = Convert.ToString((char)29);
string ESC = Convert.ToString((char)27);

//Assemble the paper cut command
string COMMAND = "";
COMMAND = ESC + "@";
COMMAND += GS + "V" + (char)1;

//Assemble the print logo command

String printCommand = ESC + "@";
printCommand += GS;

printCommand += Convert.ToString((char)40);
printCommand += Convert.ToString((char)76);
printCommand += Convert.ToString((char)6);
printCommand += Convert.ToString((char)0);
printCommand += Convert.ToString((char)48);
printCommand += Convert.ToString((char)69);
printCommand += Convert.ToString((char)48);
printCommand += Convert.ToString((char)48);
//printCommand += (48).ToString();
//printCommand += (48).ToString();
printCommand += ((char)(1)).ToString();
printCommand += ((char)(1)).ToString();

//END OF PRINT COMMAND
jprofitt
  • 10,874
  • 4
  • 36
  • 46
Paul Plato
  • 1,471
  • 6
  • 28
  • 36