Sneaky Abstractions

Subscribe to my Feed, follow me on , recommend me on Working With Rails or see my code on GitHub

Comment

You're viewing a comment to the post Barby 0.3: Ruby 1.9 compatible and pure-ruby SVG outputter

By tore.darell.no at

John: To keep things simple Barby’s outputters only focus on generating the barcode itself without any extra data, and I don’t think this is something that should be included by default in the future. But you can access all the relevant data on the barcode object and add those to the barcode image after it’s been generated. With the RMagick outputter you can use to_image to get an editable image which you can superimpose the numbers on. When it comes to the EAN-13 barcodes they’re a little weird (which is one of the reasons I don’t think there should be a general solution for this), but I guess you can use a white background to hide the bars behind the numbers.

Another reason Barby does not include this data in the image is that sometimes you work with a medium (e.g. HTML, PDF) which is ideally suited to contain that data in text form.

O woe! What shall I do, Utanapishtim, where shall I go!