Generating barcodes (as gif/jpg)

M

Matt Pelletier

Hello Rubyists,

I need to generate barcodes (in UPC and codabar symbologies) and
would like to know if anyone has done this with Ruby. From what I can
tell, it would be possible to use the gnu-barcode [1] or
barcodewriter [2] to generate a PostScript, then through RMagick (via
GhostScript) take the file and create a GIF/JPG.

These will really only be used for web display (to be printed and
scanned elsewhere), so even though I'm referring to PS above it's not
a necessary component. Any solution that takes a numeric code and
generates a barcode as GIF/JPG is suitable.

I know there is a barcode gem (which uses RMagick directly) but it
only works for the code-39 symbology. I'll be happy to add to it if
it makes sense (and if the author is so inclined).

I have also seen various Perl/Python etc. tools out there. I can port
it and gemmify if that's the best solution, but my hunch is PS ->
RMagick -> GIF/JPG will be the most straightforward.

TIA,
Matt

[1] GNU-barcode (http://www.gnu.org/software/barcode/barcode.html)
[2] Barcode Writer (http://www.terryburton.co.uk/barcodewriter/)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top