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.

10 comments on “A hurrah moment!

  1. Glad you found the example useful! The code was so old, I hope it didn’t give you fits trying to get it to work again :)

    I guess the next step would be to get your stuff working with Prawn? Let me know if you try that out!

  2. Hi Nick! Yeh it worked fine thanks. I hope you’ll have a look at the pdf_label_maker and see how i enabled options instead of constants.

    Prawn kenn’ich nicht. Was ist das? Ooops, i’m thinking in German right now! What is Prawn?

Leave a reply to Canvas Art Cancel reply