This is something I released a while ago, but I thought I’d announce
it here too, as I’m sure not everyone in the target group reads my
blog.
Barby is a pure Ruby barcode generator. It doesn’t rely on 3rd party
libraries (well, unless you want it to do anything useful) and it’s
easily extensible. It currently supports the following symbologies:
Code128
GS1128 (aka EAN/UCC-128)
EAN-13 (aka UPC-A)
Bookland
EAN-8
Code39
The logic for generating graphical representations of the barcodes is
split into “outputters”. There are currently two outputters, one that
uses RMagick and another that annotates a PDF/Writer document, and
creating new ones is easy.
Hm, it’s a while now since I uploaded it to RF, so it should work.
This is my first gem on RF, so I might not have done everything right,
but it works for me now, and has before too… Hopefully (or, hopefully
not, probably) it’s just some sort of server hickup.
Hm, it’s a while now since I uploaded it to RF, so it should work.
This is my first gem on RF, so I might not have done everything right,
but it works for me now, and has before too… Hopefully (or, hopefully
not, probably) it’s just some sort of server hickup.
The next feature I’ll add is that you can specify the maximum width of
barcodes, as some applications apparently require this.
The code is not very Rubyish as you’ll see, but we can’t really help it.
With Ruby FPDF we’re stuck in a world where Ruby speaks PHP, so which
way around should an FPDF extension think? This one is messed up in its
head and tries to do both, with variables in all sorts of casings. I’ll
have to clean that up. Also, some more error handling would be nice.
We’ll be starting to use this in production with several ten thousand
barcodes in Code 128A and Code 39, because we soon need to put together
a batch labeling feature for our inventory system, so I’m sure it’ll
improve a bit then
Let me know how and if it works for you, against all odds.
To whoever wrote this application/extension, I’d like to express my
gratitude. I’m facing an issue where barcodes could be the solution…
especially how these barcodes can be outputted to PDF is hopeful to me,
so I’m looking forward putting it to the test… anyway, without your
collective efforts, I’d had little to test, so thanks a bunch.