Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a bold header in a Prawn table

I'm using Prawn and need to make the Header row bold but I can't find any solution in the API.

Here you can see my current table with normal text Headers

pdf.table (Data, :header => true) do
  table.header=(["Header1", "Header2", "Header3", "Header4"])        
end
like image 435
Hunter001 Avatar asked Jul 19 '11 09:07

Hunter001


Video Answer


1 Answers

Its just as simple as I thought

pdf.table Data, {:header => true} do |table|
    table.header=(["Header1", "Header2", "Header3", "Header4"])     
    table.row(0).font_style = :bold
end
like image 185
Hunter001 Avatar answered Sep 21 '22 05:09

Hunter001