I'm using Wicked_PDF GEM. Is it possible to set the document height to "AUTO" or something, So that it would change according to the count of created line items inside an order ?
And If not could you guide me to another tool or GEM to help me do so?
Orders.rb
def show
respond_to do |format|
format.html
format.pdf do
render pdf: @order.id.to_s,
disposition: 'inline',
layout: "reciept",
template: "orders/showPDF.html.erb",
show_as_html: params.key?('debug'),
page_height: 160,
page_width: 80,
margin: { top: 10,
bottom: 15,
left: 5,
right: 5 }
end
end
end