I need a table where rows are actually 2 rows tables, a nested table that is.. How can I do that in prawn? Maybe I need an extension.. but which one?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
No support for this exists in released versions, but in the master branch of http://github.com/sandal/prawn you'll find our revamped table support which has nested tables. Take a look at the examples/ dir.
回答2:
Subtables are now supported:
Prawn::Document.generate("subtable.pdf") do |pdf|
subtable = pdf.make_table([["sub"], ["table"]])
pdf.table([[subtable, "original"]])
end
回答3:
Table nesting was actually the major inspiration for Crayfish.
As far as I know Prawn still can't do proper sizing and cell placements on more sophisticated tables.