Create a gist now

Instantly share code, notes, and snippets.

@joemsak /packingslip.rb Secret
Created Oct 19, 2012

What would you like to do?
# 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|
start_new_page unless order == orders.last
# ...

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