title: JavaScript print with POS printer paper size
body: <p>I am trying to print specific div in POS printer. My printer name is <strong>Optimuz</strong> . I also tried with</p>
  <pre><code>&lt;div id=&quot;printAreaInvoice&quot; style=&quot;visibility: hidden;font-size:8px;width:200px;&quot;&gt;&lt;/div&gt;
                          
  &lt;input type='button' id='printInvoice' value='Print'&gt;
  
   $(document).on('click','#printInvoice',function () {
              printJS({
                  maxWidth: 440, // the width of your paper
                  printable: 'printAreaInvoice', // the id
                  type: 'html',
                  css: 'print.css' // your css
              });
          });
  </code></pre>
  <p><strong>I loaded print content after page loaded. $('#printAreaInvoice').html(response.printData);</strong></p>
  <p>contents loads on div like</p>
  <pre><code>echo '&lt;table class=&quot;tblData&quot; style=&quot;width:100%;font-size:8px;&quot;&gt;';
  echo '&lt;tr&gt;';
  echo '&lt;td style=&quot;font-size:8px;&quot;&gt;'.$item_name.' ---- '.$per_item_price.' &lt;/td&gt;';
  
  echo '&lt;/tr&gt;';
  echo '&lt;/table&gt;';
  </code></pre>
  <p>But it takes full width. Still I did not connect printer because of <strong>availability</strong>. How can I fix that . Is it possible on that printer. Thanks in advance</p>