A hurrah moment!

Not really part of the “CouchDB on Rails” series, but i thought i’d post it anyway …

I have successfully entered the addresses for Christmas cards into my database and generated PDF output that should be of the right layout to print onto Avery labels. Sweet! The really awesome thing was, i started to forget that i was working with CouchDB and it just felt like any normal Rails project.

I only know two label formats right now, and neither of them are the one that i actually want to use.

L7162 – too big:
L7162 labels

J8651 – too small:
J8651 labels

But the cool thing is, i made a little library, pushed to GitHub of course! It is not CouchDB-specific. It’s probably not even Rails-specific, although the examples are. Perhaps some other people will contribute the dimensions of other label formats for me.

For those who want to know how i implemented this in the CouchDB application, here’s the commit.

For those who are interested in the PdfLabelMaker library, here it is: pdf_label_maker.

My thanks to Nick Sieger for giving me the example code to begin from.

Update 14th December 2008: Success! Labels printed and Christmas cards written! :) See this post for more.