Skip to content

Instantly share code, notes, and snippets.

@bradediger
Created April 5, 2011 16:47
Show Gist options
  • Select an option

  • Save bradediger/903978 to your computer and use it in GitHub Desktop.

Select an option

Save bradediger/903978 to your computer and use it in GitHub Desktop.
require 'rubygems'
gem 'prawn', '0.11.1'
require 'prawn'
Prawn::Document.generate 'table_test.pdf' do |pdf|
pdf.table [['cell1','cell2'],['cell3','cell4']] do
cells[0, 1].style(:borders => [:bottom, :left])
cells[1, 1].style(:borders => [:bottom, :right])
end
pdf.table [['cell1','cell2'],['cell3','cell4']] do
rows(0).style(:borders => [:bottom, :left])
rows(1).style(:borders => [:bottom, :right])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment