How to make a bold title in a shrimp table

I use Prawn and I need to make the title bar bold, but I cannot find any solution in the API.

Here you can see the current table with the plain text Headings

pdf.table (Data, :header => true) do table.header=(["Header1", "Header2", "Header3", "Header4"]) end 
+7
source share
3 answers

Its 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 
+11
source
 pdf.text "your header.", :size => 9.8, :style => :bold, :spacing => 1.5, :align => :right 
0
source
 pdf.table( data, :headers => [ "Header1", {:text => "Header2", :font_size => :bold}, "Header3", "Header4"] ) 

other parameters:

: align_headers: header_text_color: Header_color

see http://rubydoc.info/gems/prawn-layout/0.8.4/Prawn/Table

0
source

All Articles