README.rdoc in check_writer-0.0.0 vs README.rdoc in check_writer-0.1.0

- old
+ new

@@ -1,19 +1,29 @@ = check_writer A ruby gem to help generate checks in PDF format. +It generates PDF checks that look something +like this[https://github.com/rylwin/check_writer/raw/master/spec/assets/test-0.12.0.pdf]. +Print that PDF on check stock and you've got yourself a real check. + == Project Status -A version of this code has been used in a production application for a couple of years and we are finally getting around to extracting the check writing code. As we go through this process, there may be significant changes to the API. You've been warned. +A version of this code has been used in a production application for a couple of years +and we are finally getting around to extracting the check writing code. As we go through this +process, there may be significant changes to the API. You've been warned. Currently the only check stock format that is supported is the 1/3 bottom check. -You can get some check stock at Amazon[http://www.amazon.com/gp/product/B002HIV1KQ/ref=as_li_qf_sp_asn_il_tl?ie=UTF8&tag=checkwriter-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=B002HIV1KQ], amongst other places. +You can get some check stock at +Amazon[http://www.amazon.com/gp/product/B002HIV1KQ/ref=as_li_qf_sp_asn_il_tl?ie=UTF8&tag=checkwriter-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=B002HIV1KQ], +amongst other places. == GnuMICR -check_writer uses GnuMICR (http://www.sandeen.net/GnuMICR) to print the MICR numbers at the bottom of the check. Please read the notes on the GnuMICR site. We have not had any issues using this font (2+ years now), but that is no guarantee. +check_writer uses GnuMICR (http://www.sandeen.net/GnuMICR) to print the MICR numbers at the +bottom of the check. Please read the notes on the GnuMICR site. We have not +had any issues using this font (2+ years now), but that is no guarantee. == Example @check = CheckWriter::Check.new( :number => '12345', # the check number @@ -36,10 +46,21 @@ :memo => 'Memo: Void after 60 days' ) check.to_pdf # returns PDF file data -Check out spec/assets to see what the output looks like. +If you set the +with_stubs+ option to +true+ you'll get a bit of formatting +and information displayed in the top and middle check stub. +Here's an example[https://github.com/rylwin/check_writer/raw/master/spec/assets/test-0.12.0.pdf]. + +Instead of just returning a PDF, you can access the Prawn PDF writer object +(Prawn::Document), which you can use to further customize the check or even +include multiple checks on the same PDF: + + pdf = check1.to_prawn + pdf.start_new_page # this is a prawn method + pdf = check2.to_prawn(pdf) + pdf.render # returns the PDF data for a PDF w/ two checks on two pages == Tests check_writer uses the appraisal gem to facilitate testing of various versions of prawn. To run the tests using appraisal: