I want to specify a font style for a certain cell. What I found in the documentation is the capacity to do it for all the cell, but not for one I need:
table data, :cell_style => { :font => "Times-Roman", :font_style => :italic }
How do I do that for only one cell?
Turn your table into a block to do more configuration and then you can find it by row and column. See line 2 for your font, I included a couple other examples to set styles by rows & columns:
table(invoice_header_data, width: 210) do
style(row(0).column(0), font: "Times-Roman")
style(rows(0..-1), :padding => [2, 10, 2, 10], :borders => [])
style(row(4), padding: [12, 10], :font_style => :bold)
style(columns(1..3), :align => :right)
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With