表格单元格边框
这是我需要生成的 2x2 表格:
r1c1 r1c2
r2c1 r2c1
----
换句话说,我应该打印右下单元格的下边框。这是我的代码:
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
好吧,用这个代码我有一个没有边框的 2x2 表格!
有人有任何提示吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里有一个更广为人知的解决方案:
省略 headers => [“h1”,“h2”]您避免使用带下划线的标题。
Here one solution better known as workaround:
Omitting headers => ["h1","h2"] you avoid the underlined header.