views:

269

answers:

2
+1  Q: 

Table cell border

Hi guys,

This is the 2x2 table I need to generate:

r1c1  r1c2
r2c1  r2c1
      ----

In other words I should print the bottom border of the bottom right cell. This is my code:

show.pdf.prawn

#This is a two dimensional array:
my_array = [["r1c1","r1c2"],["r2c1",Prawn::Table::Cell.new(:text => "r2c2", :border_width => 1 , :borders => :bottom)]]

#Table
pdf.table my_array, :border_width => 0

Well, with this code I have a 2x2 table with no borders!

Has someone any tip?

A: 

Here one solution better known as workaround:

#This is a two dimensional array:
my_array = [["r1c1","r1c2"],["r2c1",Prawn::Table::Cell.new(:text => "r2c2", :border_width => 1 , :borders => [:bottom])]]

#Table
pdf.table my_array, 
#:headers => ["h1","h2"],
:border_style => :underline_header

Omitting headers => ["h1","h2"] you avoid the underlined header.

baijiu
A: 

i want double border line of the table using pdf.table in prawnto

can any one help me kindly

vara
"Add Another Answer" doesn't mean "Add Another Question".
baijiu