title: Converting barcode text to code128 required format for Microsoft Word to render as font
body: <p>I am trying to convert an alphanumeric text to the required format of Code128 barcode type. I will then embed this in Microsoft Word template which has code128 type fonts installed and print it out to make it scannable.</p>
  
  <p>Code39 works as intended because it is easy to convert it into the required format. You just start and end with asterisk (*). </p>
  
  <p>How can I convert a text to required string for code128 format in javascript?</p>
  
  <p>I have tried the open source JsBarcode library. I can get the binary data of the barcode, can I convert from there, or should I just look up the code128 table and make the ascii calculations? </p>
  
  <p>Example Input:</p>
  
  <pre><code>Code 128456
  </code></pre>
  
  <p>Example Output:</p>
  
  <pre><code>ÌCodeÂÇ,tXXÎ
  </code></pre>
  
  <p><a href="https://www.idautomation.com/kb/scan-font.html" rel="nofollow noreferrer">Reference</a></p>
  
  <p>Thanks.</p>