Sha256: 3c498416b02fc792ed53748223d162141d08478579e0980c10c946f6d6e94815

Contents?: true

Size: 677 Bytes

Versions: 6

Compression:

Stored size: 677 Bytes

Contents

require_relative "../../lib/prawn"

images = [
      ["Type 0", "#{Prawn::BASEDIR}/data/images/web-links.png"],
      ["Type 2", "#{Prawn::BASEDIR}/data/images/ruport.png"],
      ["Type 3", "#{Prawn::BASEDIR}/data/images/indexed_color.png"],
      ["Type 4", "#{Prawn::BASEDIR}/data/images/page_white_text.png"],
      ["Type 6", "#{Prawn::BASEDIR}/data/images/dice.png"],
]

Prawn::Document.generate("png_types.pdf", :page_size => "A5") do
  images.each do |header, file|
    start_new_page unless header.include?("0")

    fill_color "FF0000"

    fill_rectangle bounds.top_left, bounds.width, bounds.height
    text header 
    
    image file, :at => [50,450]
  end 
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
prawn-1.0.0 spec/acceptance/png.rb
prawn-0.15.0 spec/acceptance/png.rb
prawn-0.14.0 spec/acceptance/png.rb
prawn-0.13.2 spec/acceptance/png.rb
prawn-0.13.1 spec/acceptance/png.rb
prawn-0.13.0 spec/acceptance/png.rb