Sha256: 00ef5ef2d2b950ba62ec68d744aeb0c15f9c4013378cdbecc0aa882f9b3f5183

Contents?: true

Size: 548 Bytes

Versions: 7

Compression:

Stored size: 548 Bytes

Contents

$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
require "prawn"                                           
                                                    
file = "lazy_bounding_boxes.pdf"
Prawn::Document.generate(file, :skip_page_creation => true) do                    
  point = [bounds.right-50, bounds.bottom + 25]
  page_counter = lazy_bounding_box(point, :width => 50) do   
    text "Page: #{page_count}"
  end 
  
  10.times do         
    start_new_page
    text "Some text"  
    page_counter.draw
  end
end
  
   
    

Version data entries

7 entries across 7 versions & 4 rubygems

Version Path
fullcirclegroup-fullcirclegroup-prawn-0.2.99.2 examples/lazy_bounding_boxes.rb
fullcirclegroup-prawn-0.2.99.3 examples/lazy_bounding_boxes.rb
satoko-prawn-0.2.99.6 examples/lazy_bounding_boxes.rb
prawn-0.2.1 examples/lazy_bounding_boxes.rb
prawn-0.2.2 examples/lazy_bounding_boxes.rb
prawn-0.2.0 examples/lazy_bounding_boxes.rb
prawn-0.2.3 examples/lazy_bounding_boxes.rb