Created
November 9, 2008 13:39
-
-
Save practicingruby/23280 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "open-uri" | |
| Prawn::Document.generate("github-invoice.pdf", :top_margin => 68) do | |
| text "Invoice / Receipt", :size => 24, :style => :bold | |
| move_down 30 | |
| text "Account billed: defunkt (chris@ozmm.org)", :size => 14 | |
| move_down 20 | |
| time = Time.now.strftime("%m-%d-%y %I:%M%p %Z") | |
| col_widths = { 0 => 200, 1 => 80, 2 => 80 } | |
| table [[time, "Small", "9.00"]], :headers => %w[Date Plan Price], | |
| :row_colors => %w[eeeeee ffffff], | |
| :align => { 2 => :right }, | |
| :align_headers => :left, | |
| :widths => col_widths | |
| move_down 40 | |
| stroke_horizontal_rule | |
| move_down 10 | |
| text "Logical Awesome, LLC\n582 Market Street, Suite 700\n" << | |
| "San Francisco, CA 94104\nsupport@github.com", :size => 14 | |
| image open("http://github.com/images/modules/header/logo.png"), | |
| :at => [345, bounds.top + 25], :scale => 1.25 | |
| image "paid.png", :at => [125, 400], :scale => 1.6 | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment