Sha256: 3c5d107d99e08473edf3f7605f401c7877bc01269a6fcd1660520ab0c8ca84a5

Contents?: true

Size: 984 Bytes

Versions: 21

Compression:

Stored size: 984 Bytes

Contents

# encoding: utf-8
#
# This demonstrates basic page layout and landscape options for Prawn
# documents.  The style used here is a bit out of date, see 
# multi_page_layout.rb for a more modern example.
#
require "#{File.dirname(__FILE__)}/../example_helper.rb"

def pdf(*options)  
  Prawn::Document.new(*options)
end
                                     
# defaults to portrait and US letter
portrait_letter = pdf 
portrait_letter.render_file "portrait_letter.pdf"

landscape_letter = pdf(:page_layout => :landscape)
landscape_letter.render_file "landscape_letter.pdf"  

portrait_legal = pdf(:page_size => "LEGAL")
portrait_legal.render_file "portrait_legal.pdf" 

landscape_legal = pdf(:page_size => "LEGAL", :page_layout => :landscape)
landscape_legal.render_file "landscape_legal.pdf"

portrait_a4 = pdf(:page_size => "A4")
portrait_a4.render_file "portrait_a4.pdf"

landscape_a4 = pdf(:page_size => "A4", :page_layout => :landscape)
landscape_a4.render_file("landscape_a4.pdf")

Version data entries

21 entries across 21 versions & 7 rubygems

Version Path
piglop-prawn-0.10.2.3 examples/general/page_geometry.rb
piglop-prawn-0.10.2.2 examples/general/page_geometry.rb
piglop-prawn-0.10.2.1 examples/general/page_geometry.rb
prawn-0.11.1.pre examples/general/page_geometry.rb
goodwill-prawn-edge-0.10.0 examples/general/page_geometry.rb
alphasights-prawn-0.10.4 examples/general/page_geometry.rb
alphasights-prawn-0.10.3 examples/general/page_geometry.rb
alphasights-prawn-0.10.2 examples/general/page_geometry.rb
alphasights-prawn-0.10.1 examples/general/page_geometry.rb
alphasights-prawn-0.10.0 examples/general/page_geometry.rb
prawn-core-0.8.4 examples/general/page_geometry.rb
prawn-graph-0.0.2 vendor/prawn-core/examples/general/page_geometry.rb
prawn-graph-0.0.1 vendor/prawn-core/examples/general/page_geometry.rb
prawn-core-0.7.2 examples/general/page_geometry.rb
prawn-core-0.7.1 examples/general/page_geometry.rb
prawn-layout-0.3.2 vendor/prawn-core/examples/general/page_geometry.rb
prawn-core-0.6.3 examples/general/page_geometry.rb
prawn-core-0.6.2 examples/general/page_geometry.rb
prawn-layout-0.3.1 vendor/prawn-core/examples/general/page_geometry.rb
prawn-core-0.6.1 examples/general/page_geometry.rb