Sha256: a86d55717357c748c7f28cfa594761a2abd4a4f0886c9bfab54bb25e42f17d41
Contents?: true
Size: 1.06 KB
Versions: 2
Compression:
Stored size: 1.06 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.expand_path(File.join(File.dirname(__FILE__), %w[.. example_helper])) 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
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
prawn-0.11.1 | examples/graphics/image_flow.rb |
davebenvenuti-prawn-0.11.1.pre | examples/graphics/image_flow.rb |