title: How to print a QR Code using a thermal printer with EPSON commands?
body: <p>I need to print a QR Code with a thermal printer, i have tried to use EPSON commands to make it work but it hasn't worked. When i try to print the QR with this code i only get printed the info of the printer. Has anyone deal with a problem like this?</p>
  
  <p>This is the code that i used with no results.</p>
  
  <pre><code>var m_encoding = Encoding.Default;
  string QRdata = Purchase.TransactionReference.BookingId;
  int store_len = QRdata.Length + 3;
  byte store_pL = (byte)(store_len % 256);
  byte store_pH = (byte)(store_len / 256);
  
  
  string txt = m_encoding.GetString(new byte[] { 9 }); //TAB
  txt += m_encoding.GetString(new byte[] { 9 }); //TAB
  txt += m_encoding.GetString(new byte[] { 9 }); //TAB
  txt += m_encoding.GetString(new byte[] { 9 }); //TAB
  txt += m_encoding.GetString(new byte[] { 29, 40, 107, store_pL, store_pH, 49, 80, 48 }); //FUNCTION 80
  txt += QRdata;
  txt += m_encoding.GetString(new byte[] { 29, 40, 107, 3, 0, 49, 69, 48 }); //FUNCTION 69
  txt += m_encoding.GetString(new byte[] { 29, 40, 107, 3, 0, 49, 67, 5 }); //FUNCTION 67
  txt += m_encoding.GetString(new byte[] { 29, 40, 107, 4, 0, 49, 65, 50, 0 }); //FUNCTION 65
  txt += m_encoding.GetString(new byte[] { 29, 40, 107, 3, 0, 49, 81, 48 }); //FUNCTION 81                        
  txt += m_encoding.GetString(new byte[] { 13 }); //CR
  txt += m_encoding.GetString(new byte[] { 10 }); //LF
  txt += m_encoding.GetString(new byte[] { 10 }); //LF
  txt += m_encoding.GetString(new byte[] { 10 }); //LF
  txt += m_encoding.GetString(new byte[] { 27, 105 }); //CUT
  var resultQR = GenerateStreamFromString(txt);
  BinaryReader binaryQR = new BinaryReader(resultQR, Encoding.Default);
  port.Write(binaryQR.ReadBytes((int)resultQR.Length), 0, (int)resultQR.Length);
  </code></pre>