Sha256: 6456602c3101d9e0bbc03db9166a3d2037c01b14e7688dd86379e029bdd004f6
Contents?: true
Size: 773 Bytes
Versions: 8
Compression:
Stored size: 773 Bytes
Contents
# encoding: utf-8 # PNG files come in different flavours - 5 of them. This example embeds # one of each type as proof that they all work. $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib') require "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/rails.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") text header image file, :at => [50,450] end end
Version data entries
8 entries across 8 versions & 4 rubygems