Permalink
Browse files

Updated to work with latest Prawn gem (0.8.4)

  • Loading branch information...
1 parent 96557dd commit 47d7c717a123bf8b1f8566a6d0c6daabd6a8106f Yves-Eric Martin committed with Aug 3, 2010
Showing with 11 additions and 10 deletions.
  1. +1 −1 README.markdown
  2. +9 −8 app/views/admin/orders/show.pdf.prawn
  3. +1 −1 print_invoice_extension.rb
View
@@ -17,7 +17,7 @@ INSTALLATION
3. Make sure you have the required gems
- sudo gem install prawn prawn-layout
+ sudo gem install prawn --version="0.8.4"
4. Optional: Set the logo path preference to include your store / company logo (in your seeds.rb / site extension).
@@ -1,5 +1,4 @@
require 'prawn/layout'
-require 'prawn/format'
bill_address = @order.bill_address
ship_address = @order.ship_address
@@ -9,7 +8,7 @@ font "Helvetica"
image Spree::PrintInvoice::Config[:print_invoice_logo_path], :at => [0,720], :scale => 0.65
fill_color "005D99"
-text "Customer Invoice", :at => [200,698], :style => :bold, :size => 22
+text "Customer Invoice", :align => :center, :style => :bold, :size => 22
fill_color "000000"
move_down 55
@@ -154,10 +153,12 @@ bounding_box [0,cursor], :width => 540, :height => 450 do
end
-footer [margin_box.left, margin_box.bottom + 30] do
- font "Helvetica", :size => 8
-
- text "Shipping is not refundable. | Special orders are non-refundable."
- text "In order to return a product prior authorization with a RMA number is mandatory"
- text "All returned items must be in original un-opened packaging with seal intact."
+# Footer
+repeat :all do
+ footer_message = <<EOS
+Shipping is not refundable. | Special orders are non-refundable.
+In order to return a product prior authorization with a RMA number is mandatory
+All returned items must be in original un-opened packaging with seal intact.
+EOS
+ text_box footer_message, :at => [margin_box.left, margin_box.bottom + 30], :size => 8
end
@@ -7,7 +7,7 @@ class PrintInvoiceExtension < Spree::Extension
url "http://yourwebsite.com/print_invoice"
def self.require_gems(config)
- config.gem "prawn", :version => '0.6.1'
+ config.gem "prawn", :version => '0.8.4'
end
def activate

0 comments on commit 47d7c71

Please sign in to comment.