toretore/barby

HtmlOutputter give just thin strip of barcode.

tasdendu opened this issue · 0 comments

I am trying to generate barcode and print in the html page. Below is my code

require 'barby/barcode/code_128'
require 'barby/outputter/html_outputter'

@barcode ||= Barby::Code128B.new(
        'Some data'
 ).to_html

in my show.html.haml

:css
  table.barby-barcode { border-spacing: 0; width: 100px }
  tr.barby-row {}
  td.barby-cell { width: 3px; height: 3px; }
  td.barby-cell.on { background: #000; }
.
.
.
= @barcode.html_safe

And I am getting is just a thin line of barcode.

So how do I get a full buildup of barcode? Am I doing anything wrong in my code?