From Out There

Archive for the ‘ruby’ Category

Gbarcode Support for Ruby FPDF

Saturday, January 26th, 2008

I was going mad fixing a bug in a very convoluted barcode printing feature in the equipment management system we’re developing. After a while I gave up — we must have triggered something deep within Rails or Ruby, and it wasn’t going to go away soon. The details are complicated and boring, but just know this: Instead of fixing the bug, I completely rewrote our barcode handling and as a side effect developed an extension for Ruby FPDF to support Gbarcode :)

Please give it a try if you need barcode support in your PDFs and let me know what you want to improve and what fails horribly for you.

I wanted to send it to Brian Ollenberger to see if he likes it and would like to include it with Ruby FPDF, but his website appears to be down. Anyhow, I would have to clean things up and make it all elegant and sexxay first.

Still, standing on the shoulders of giants is just the beginning. With a dozen lines of code I managed to tie Gbarcode into Ruby, and through that into Rails, and I’m not even a good coder. Free Software rocks! Well, okay, FPDF isn’t technically Free Software, but still. All of this just feels very good, and it gives me a kind of productivity I could only dream of with proprietary software and complicated licenses. I had the whole thing hacked together in less than an hour.