toretore/barby

PNG barcode doesn't print cleanly

macmartine opened this issue · 2 comments

I'm generating a PNG from the barcode, but when it's printed the barcode lines aren't clean. I printed other barcodes I got elsewhere that are the same size and they print very clean and crisp. Is this an issue with the barcode generator or png outputter, or ...? Sorry if this isn't doesn't turn out to be an issue specifically with this gem.

    barcode = Barby::Code128A.new(@product.fnsku)
    outputter = Barby::PngOutputter.new(barcode)
    barcode = 'app/assets/images/barcode.png'
    File.open(barcode, 'w'){|f| f.write outputter.to_png }

No, this is not an issue with this gem. An image is an image, what you see is what you get.

@toretore So where might the issue be? When you print these are they clean enough for scanners to read them? It's not for me. Just trying to figure out if I need to look for another gem or if there's a way to get this to work sufficiently. Thanks.