title: RawPrinterHelper unable to print Barcode using ESC POS Commands
body: <p>A relatively simple task is turning into hours of frustration so here goes:</p>
  
  <p>I have various Thermal printers and we print to the using the RawPrinterHelper that Microsoft posted.
  Usually use a String builder build the string and call the SendStringToPrinter and we have a printed piece of paper.</p>
  
  <p>I'm trying to print a simple barcode via the ESC/POS commands that are supported. WE use these for other functions (cutting, change font sizes) that all works, the barcode refuses to print.</p>
  
  <p>ESC POS Command is : GS k m n d1 d2 … dn
  m：barcode type e.g. 
  n：barcode length -indicates the number of bar code data bytes
  d1 the barcode</p>
  
  <p>The question I have is, How do I send the length of the barcode? 
  I believe this where my problem lies. </p>
  
  <p>The code snippet:</p>
  
  <pre><code>StringBuilder print = new StringBuilder();
  barcode = "1234567890";
  char commandGS = '\x1D';
  char linefeed = '\x0A';
  char esc = '\x1B';
  char commandFontSize = '\x21';
  char commandk = '\x6B';
  char code128 = '\x69';
  print.Append(commandGS);
  print.Append(commandk);
  print.Append(code128);
  print.Append(barcode.Length);
  print.Append(barcode);
  string printJob = print.ToString();
  RawPrinterHelper.SendStringToPrinter(printerName, printJob);
  </code></pre>