title: How to send Raw Commands to Receipt Printer in Node.JS?
body: <h1><strong>What I am Trying to do</strong></h1>
  <p>Currently have a receipt printer that supports ESC/P raw printing.</p>
  <p>I am building an app that will need to print receipts remotely.</p>
  <p><strong>How I am doing this</strong></p>
  <p>Sending data through PrintNodes API from my app to the printer.</p>
  <p>I have used an NPM library 'ESCPOS' and have successfully printed a few samples.</p>
  <p>(The <strong>'ESCPOS'</strong> npm is not a remote printing library - but i did the test to make sure everything was working properly and it is)</p>
  <h1><strong>My Issue</strong></h1>
  <p>Print node requires that the content-type of your print job to be &quot;raw_base64&quot;.</p>
  <p>So I take my raw commands</p>
  <p>Convert them to hex byte</p>
  <pre><code>0x1B&quot;@&quot;0x1B0x38'should be bold'
  </code></pre>
  <p>and then convert that to base_64</p>
  <pre><code>MHgxQiJAIjB4MUIweDM4J3Nob3VsZCBiZSBib2xkJw==
  </code></pre>
  <p>What I get printed is the plain text of decoded base64 rather than the rendered commands that I sent the printer.</p>
  <p>The example receipt above should be the string &quot;Should be bold&quot; in bold.</p>
  <p>What i get returned is all the hex values of my raw esc/p commands.</p>
  <p><img src="https://i.imgur.com/J34lNa0.jpg" alt="My Print Output" /></p>
  <h1><strong>What I've Done</strong></h1>
  <p>I have tried ESCPOS (NPM library) and send data directly to the printer without Printnode and it prints perfect.</p>
  <p>This leads me to believe that perhaps I am not sending the data correctly.</p>
  <p><strong>This is what I send in my post request to printnode api</strong></p>
  <pre><code>let bodytosend = {
      printer: 69079558,  
      title: 'Sample Print Job',
      contentType: 'raw_base64',
      content: &quot;MHgxQiJAIjB4MUIweDM4J3Nob3VsZCBiZSBib2xkJw==&quot;,
      source: 'Created from node app.js'
  }
  </code></pre>