Sha256: 1fee0875e2b85c6965b89a0e047e5c3609fa650212ec2f2c892c2a1a85926167

Contents?: true

Size: 516 Bytes

Versions: 10

Compression:

Stored size: 516 Bytes

Contents

#!/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

Version data entries

10 entries across 10 versions & 1 rubygems

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