prawn_document Arguments:

The prawn_document function can take an optional hash of arguments. These arguments will be passed to the constructor of the Prawn::Document object when it is created.

For example:


prawn_document(:page_layout => :landscape, :page_size => "LEGAL") do |pdf|
  pdf.text "Look! I'm landscape"
  pdf.text "And on legal paper too!"
Download PDF

Note: there is one exception to this. See Overriding the Rendering Class

Back To Index