Sha256: 24afb9c4a820b679ba9f4e6978921f6313142ff22c56824eedb9a6ee3edc6e95
Contents?: true
Size: 1 KB
Versions: 21
Compression:
Stored size: 1 KB
Contents
# encoding: utf-8 # # Demonstrates automated flowing and positioning of images, as well as # aligining images along the x-axis via the :position argument. This is # useful when used in combination with flowing text, where the exact final # position of the image is not known ahead of time. # require "#{File.dirname(__FILE__)}/../example_helper.rb" Prawn::Document.generate("image-flow.pdf", :page_layout => :landscape) do self.font_size = 8 stef = "#{Prawn::BASEDIR}/data/images/stef.jpg" text "Image at default position with no arguments" move_down 10 image stef text "Centered image flowing" image stef, :position => :center text "Right aligned image flowing" image stef, :position => :right text "Explicitly left aligned image flowing" move_down 10 image stef, :position => :left text "Flowing image at x=50" image stef, :position => 50 end
Version data entries
21 entries across 21 versions & 7 rubygems