Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View packingslip.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
# coding: utf-8
 
class PackingSlip < Prawn::Document
# recognized options
# :needs_cover_page => true|false
def initialize(orders, options = {})
super(:page_layout => :portrait)
@orders = orders
@options = options
 
default_leading 5
 
cover_page if cover_page_needed?
 
@orders.each do |order|
order_page(order)
start_new_page unless order == orders.last
end
end
 
# ...
 
end

Can you please also include the structure of order_page(order) here ?

Would make it complete ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.