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/)
On Fri, 26 Aug 2005, Matt Pelletier wrote:> 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.[...]> 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.This perl one exists to create telepen codes as pnm images [not what you want exactly but maybe worth archiving]: http://lists.linux.it/pipermail/barcode/2002-November/000136.html or http://www.cl.cam.ac.uk/~mgk25/download/telepen.pl and I have converted it to Ruby, but have not been able to contact Markus Kuhn to get permission to release it It is elsewhere, should that link die: google for markus kuhn telepen> > TIA, > MattHugh