ruby on rails - How do I set the font size in a prawn table? -
how set font size in pdf table using prawn gem?
when call prawn following:
pdf = prawn::document.new(:page_size => 'legal', :page_layout => :landscape) pdf.table data, :header => true, :column_widths => widths, :font_size => 7, :row_colors => ["eeeeee", "ffffff"]
i nomethoderror
undefined method `font_size=' #<prawn::table:0x6ce37ea4>
when remove ":font_size => 7", renders undesirable font size.
i using prawn 0.12.0, ruby 1.9.3p194, , rails 3.1.9.
you have apply size property cell text directly. here how this:
pdf.table data, :header => true, :column_widths => widths, :cell_style => { size: 7 }, :row_colors => ["eeeeee", "ffffff"]
Comments
Post a Comment