Skip to content

Instantly share code, notes, and snippets.

@bradediger
Created September 9, 2011 16:11
Show Gist options
  • Save bradediger/1206633 to your computer and use it in GitHub Desktop.
Save bradediger/1206633 to your computer and use it in GitHub Desktop.
# Style only the first column
pdf.table(leftside, :column_widths => { 0 => 50, 1 =>> 100 }) do |t|
t.column(0).style(:overflow => :shrink_to_fit, :min_font_size => 8)
end
# Custom style for only text cells
pdf.table(leftside, :column_widths => { 0 => 50, 1 =>> 100 }) do |t|
t.cells.grep(Prawn::Table::Cell::Text).each do |c|
c.style(:overflow => :shrink_to_fit, :min_font_size => 8)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment