Rabels Library
Rabels is a ruby library that provides the ability to create a PDF file of mailing labels. The Rabels::Address and Rabels::LabelSpecification classes are populated by the user and passed into the create_labels method as parameters. Rabels requires the pdf-writer library to actually generate the PDF.
WARNING
Rabels is a dead project. You should use pdf-labels instead. It’s much better, as it comes pre-configured with a bunch of label types, and its API lets you put anything you want on the label (not just an address).
Usage
# Create an address that Rabels can use
address = Rabels::Address.new(
:addressee => 'Mr. & Mrs. John and Jane Doe and Family',
:address_line_1 => '12345 Mockingbird Lane',
:city => 'Chicago',
:state => 'IL',
:zip => '60606')
# Dump 10 of these addresses into an Array
addresses = []
10.times { addresses << address }
# Create some specifications for the labels, specifying sizes in inches
label_spec = Rabels::LabelSpecification.new(
:page_margin_top => 0.5,
:page_margin_bottom => 0.5,
:page_margin_left => 0.15625,
:page_margin_right => 0.15625,
:label_width => 2.625,
:label_height => 1,
:label_font => 'Times-Roman',
:label_font_size => 10,
:label_font_color => Color::RGB::Black,
:label_justification => :center)
# Create the PDF
Rabels.create_labels(addresses, label_spec, 'test.pdf')
# Create a new PDF, using the pre-configured specs for the
# Avery 8660 label
Rabels.create_labels(addresses,
Rabels::get_preconfigured_label_specifications['AVERY_8660'],
'test2.pdf')
Download
GitHub
Most Popular Posts
Tags
.NET
android
apple
bugzilla
C#
career development
charts
code coverage
concurrency
continued education
couchdb
couchdb case study
couchrest
design
dsl
exceptions
funny
git
GitHub
Gnome Do
groovy
hardware
interviews
java
javaee
javaone2008
macbook
non-tech news
nosql
open source
orbitz
personal projects
polyglot persistence
productivity
rails
rails3
ruby
Software
Standup Timer
testing
textme
TravelAgent
ubuntu
weather
windycitydb
Archives
- May 2012 (1)
- April 2012 (1)
- March 2012 (1)
- February 2012 (1)
- December 2011 (1)
- September 2011 (1)
- July 2011 (1)
- May 2011 (1)
- April 2011 (1)
- March 2011 (1)
- January 2011 (2)
- November 2010 (2)
- September 2010 (1)
- August 2010 (1)
- July 2010 (2)
- June 2010 (2)
- April 2010 (1)
- March 2010 (1)
- February 2010 (2)
- January 2010 (1)
- December 2009 (1)
- November 2009 (1)
- September 2009 (2)
- August 2009 (3)
- July 2009 (2)
- June 2009 (3)
- April 2009 (1)
- February 2009 (1)
- January 2009 (2)
- December 2008 (8)
- November 2008 (2)
- October 2008 (3)
- September 2008 (6)
- July 2008 (3)
- June 2008 (1)
- May 2008 (8)
- April 2008 (6)
- March 2008 (2)
Blogroll
Industury News
Other Links
My GitHub Feed
- jwood pushed to master at signal/signal-ruby
- jwood pushed to master at signal/proby
- jwood pushed to master at signal/proby
- jwood pushed to master at signal/signal-ruby
- jwood pushed to master at signal/proby
- jwood pushed to master at signal/signal-ruby
- jwood pushed to master at signal/signal-ruby
- jwood pushed to master at signal/proby-ruby
- jwood commented on pull request 9 on stripe/stripe-ruby
- jwood pushed to master at signal/proby





