Sha256: 0930ef1e45cd57e5f3a6e2e9f54fe3f893f4d297f0b66266c2a322309d2be44e

Contents?: true

Size: 570 Bytes

Versions: 12

Compression:

Stored size: 570 Bytes

Contents

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

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

require 'pdf/wrapper'

pdf = PDF::Wrapper.new("scaled_image.pdf", :paper => :A4)
pdf.image(File.dirname(__FILE__) + "/../specs/data/zits.gif",     :top => 100, :height => 200, :width => 200, :proportional => true, :center => true)
pdf.rectangle(pdf.margin_left, 100, 200, 200)
pdf.image(File.dirname(__FILE__) + "/../specs/data/windmill.jpg", :top => 400, :height => 200, :width => 200, :proportional => true, :center => true)
pdf.rectangle(pdf.margin_left, 400, 200, 200)

pdf.finish

Version data entries

12 entries across 12 versions & 1 rubygems

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