Sha256: 4402a9151f81e98a5d40db604f7148264caab51b9a579f90650b44b28fe6ec0c
Contents?: true
Size: 944 Bytes
Versions: 5
Compression:
Stored size: 944 Bytes
Contents
#!/usr/bin/env ruby # coding: utf-8 $:.unshift(File.dirname(__FILE__) + "/../lib") require 'pdf/wrapper' pdf = PDF::Wrapper.new(:paper => :A4) pdf.default_font("Sans Serif") pdf.default_color(:black) pdf.text("PDF::Wrapper Supports Images", :alignment => :center) pdf.image(File.dirname(__FILE__) + "/../specs/data/zits.gif") pdf.image(File.dirname(__FILE__) + "/../specs/data/google.png", :left => 100, :top => 350) 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.default_color(:red) pdf.render_to_file("image.pdf")
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
pdf-wrapper-0.0.3 | examples/image.rb |
pdf-wrapper-0.0.4 | examples/image.rb |
pdf-wrapper-0.0.5 | examples/image.rb |
pdf-wrapper-0.0.6 | examples/image.rb |
pdf-wrapper-0.0.7 | examples/image.rb |