title: Generate QRCode in Printer Thermal using ESC POS
body: <p>I have a script like the one below,
  This script is used to print data and QR code, I have succeeded with the data, and now I am still looking for how to display the QR code in print. I have tried using an html script but only the string appears, and also uses the java function, but it is still considered undefined.
  Please help me, how to generate qr code to display in print.</p>
  
  <pre><code>function print(o) {
      if (jspmWSStatus()) {
          //Create a ClientPrintJob
          var cpj = new JSPM.ClientPrintJob();
          //Set Printer type (Refer to the help, there many of them!)
          if ($('#useDefaultPrinter').prop('checked')) {
              cpj.clientPrinter = new JSPM.DefaultPrinter();
          } else {
              cpj.clientPrinter = new JSPM.InstalledPrinter($('#installedPrinterName').val());
          }
          //Set content to print...
          //Create ESP/POS commands for sample label
          var esc = '\x1B'; //ESC byte in hex notation
          var newLine = '\x0A'; //LF byte in hex 
  
          var cmds = esc + "@"; //Initializes the printer (ESC @)
          cmds += esc + '!' + '\x38'; //Emphasized + Double-height + Double-width mode selected (ESC ! (8 + 16 + 32)) 56 dec =&gt; 38 hex
          cmds += 'PRUDENTIAL'; //text to print
          cmds += newLine + newLine;
          cmds += esc + '!' + '\x00'; //Character font A selected (ESC ! 0)
          cmds += '&lt;?=$qrcode?&gt;';
          cmds += newLine + newLine;
          cmds += esc + '!' + '\x00'; //Character font A selected (ESC ! 0)
          cmds += 'ID : ' + '&lt;?=$id?&gt;';
          cmds += newLine;
          cmds += 'AGENT CODE : ' + '&lt;?=$agent_code?&gt;';
          cmds += newLine;
          cmds += 'NAME : ' + '&lt;?=$agent_name?&gt;';
          cmds += newLine;
          cmds += 'ACHIEVEMENT : ' + '&lt;?=$achievement?&gt;';
          cmds += newLine + newLine;
          cmds += esc + '!' + '\x18'; //Emphasized + Double-height mode selected (ESC ! (16 + 8)) 24 dec =&gt; 18 hex
          cmds += '# ITEMS SOLD 2';
          cmds += esc + '!' + '\x00'; //Character font A selected (ESC ! 0)
          cmds += newLine + newLine;
          cmds += '11/03/13  19:53:17';
  
          cpj.printerCommands = cmds;
          //Send print job to printer!
          cpj.sendToClient();
      }
  } 
  </code></pre>