Skip to content

Commit

Permalink
add another table sample
Browse files Browse the repository at this point in the history
  • Loading branch information
yob committed Oct 14, 2009
1 parent 3781887 commit d555cd2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions examples/table_simple.rb
@@ -0,0 +1,20 @@
#!/usr/bin/env ruby
# coding: utf-8

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

require 'pdf/wrapper'

pdf = PDF::Wrapper.new("table.pdf", :paper => :A4)

data = []
data << ["This is some longer text to ensure that the cell wraps","oh noes! the cols can't get the width they desire",3,4]
data << ["This is some longer text to ensure that the cell wraps","oh noes! the cols can't get the width they desire",3,4]
data << [[], "j", "a", "m"]

(1..100).each do
data << %w{1 2 3 4}
end

pdf.table(data)
pdf.finish

0 comments on commit d555cd2

Please sign in to comment.