Sha256: e7afaf0411633dfb03db8442d8f2881a86ca83b9fd44e3d049ae209c8fae4dc5

Contents?: true

Size: 950 Bytes

Versions: 12

Compression:

Stored size: 950 Bytes

Contents

#!/usr/bin/env ruby
# coding: utf-8

$:.unshift(File.dirname(__FILE__) + "/../lib")

require 'pdf/wrapper'

pdf = PDF::Wrapper.new("image.pdf", :paper => :A4)
pdf.font("Sans Serif")
pdf.color(:black)
pdf.text("PDF::Wrapper Supports Images", :alignment => :center)
pdf.image(File.dirname(__FILE__) + "/../specs/data/zits.gif")
pdf.start_new_page
pdf.image(File.dirname(__FILE__) + "/../specs/data/google.png", :left => 100, :top => 350)
pdf.start_new_page
pdf.image(File.dirname(__FILE__) + "/../specs/data/stef.jpg", :left => 200, :top => 500)
pdf.start_new_page
pdf.image(File.dirname(__FILE__) + "/../specs/data/orc.svg", :left => pdf.margin_left, :top => pdf.margin_top, :width => pdf.body_width, :height => pdf.body_height)
pdf.start_new_page
pdf.image(File.dirname(__FILE__) + "/../specs/data/utf8-long.pdf", :left => pdf.margin_left, :top => pdf.margin_top, :width => pdf.body_width/2, :height => pdf.body_height/2)
pdf.color(:red)

pdf.finish

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pdf-wrapper-0.4.5 examples/image.rb
pdf-wrapper-0.4.4 examples/image.rb
pdf-wrapper-0.4.1 examples/image.rb
pdf-wrapper-0.4.0 examples/image.rb
pdf-wrapper-0.3.5 examples/image.rb
pdf-wrapper-0.3.4 examples/image.rb
pdf-wrapper-0.3.3 examples/image.rb
pdf-wrapper-0.3.2 examples/image.rb
pdf-wrapper-0.3.1 examples/image.rb
pdf-wrapper-0.3.0 examples/image.rb
pdf-wrapper-0.2.0 examples/image.rb
pdf-wrapper-0.2.1 examples/image.rb