ganesh ganesh

ganesh ganesh

  • NA
  • 7
  • 489

Display different currency symbol in toshibhawifi printer

Aug 21 2017 5:52 AM

Team,

I am trying to print CPCL commands in toshiba printer using c# tcpclient socket programming.

this is my code
System.Net.Sockets.TcpClient client = new System.Net.Sockets.TcpClient();
client.Connect(ipAddress, port)
StreamWriter writer = new StreamWriter(client.GetStream())
string printtemplate="! 0 200 200 300 1
PAGE-WIDTH 396
T 4 1 10 80 £75
T 4 1 140 80 £75
T 4 1 280 80 £75
FORM
PRINT" ;
byte[] unicodeBytes = Encoding.Unicode.GetBytes(printtemplate);
byte[] win1252bytes = Encoding.Convert(Encoding.Unicode, Encoding.GetEncoding(1252), unicodeBytes);
writer = new System.IO.StreamWriter(client.GetStream());
string win1252String = Encoding.GetEncoding(1252).GetString(win1252bytes);
writer.Write(win1252String);
writer.Flush();
writer.Close();
client.Close();
 
when i am trying to execute, it is printing u75 u75 u75 in toshiba printer. output should be €75 €75 €75 also it should support other country currency symbols like euro,doller and all