Skip to content

Commit

Permalink
added config option for prawn (allows setting page size, margins)
Browse files Browse the repository at this point in the history
  • Loading branch information
manu committed Apr 3, 2014
1 parent 95ab3c4 commit 27f96f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/models/spree/print_invoice_configuration.rb
Expand Up @@ -4,6 +4,7 @@ class PrintInvoiceConfiguration < Preferences::Configuration
preference :print_invoice_next_number, :integer, :default => nil
preference :print_invoice_logo_path, :string, :default => Spree::Config[:admin_interface_logo]
preference :print_buttons, :string, :default => 'invoice'
preference :prawn_options, :hash, :default => {}

def use_sequential_number?
print_invoice_next_number.present? && print_invoice_next_number > 0
Expand Down
2 changes: 1 addition & 1 deletion lib/prawn_handler.rb
Expand Up @@ -13,7 +13,7 @@ def self.call(template)

module DocumentProxy
def pdf
@pdf ||= ::Prawn::Document.new
@pdf ||= ::Prawn::Document.new(Spree::PrintInvoice::Config[:prawn_options])
end

private
Expand Down

0 comments on commit 27f96f1

Please sign in to comment.