pdf.table([header, row1, row2], width: 490, cell_style: { size: 7, align: :center }) do
style(row(0), padding: [4,2], font: "#{Prawn::BASEDIR}/data/fonts/DejaVuSans-Bold.ttf")
# style(row(0).columns(2..3), width: 10 )
# style(row(0), cell_style: {background_color: "#f5f5dc"} )
style(row(1), padding: [16,10])
style(row(1).columns(-2..-1), align: :right)
style(row(2).column(0), borders: [])
style(row(2).column(-2..-1), padding: [6,10], align: :right)
end
I want row(0)
to have a background color, but can't find out how (see the commented out lines - those are not working).
I use prawn-rails and prawn-table gems.
Thanks!