I need to create a document with nested tables in shrimp pdf.
The most recent answer to this question seems to indicate that I can do this as follows:
(Prawn::Document.generate("subtable.pdf") do |pdf| subtable = pdf.make_table([["sub"],["table"]]) pdf.table([[subtable,"original"]]) end
Unfortunatley does this with the following error:
undefined method `size=' for #<Prawn::Table::Cell::Subtable:0xad3f1e4>
So, check out the documentation that I see: "You can use Prawn :: Document # make_table to create a table to use as a subtable without drawing it directly. See /table/bill.rb examples for a bit complicated use of subtables." http://prawn.majesticseacreature.com/docs/0.11.1/Prawn/Table.html
Where can I see this example /table/bill.rb? I cloned the github repository, browsed the site and the manual, but can't find these examples anywhere!
I know I'm missing something stupid. Does anyone know how to correctly insert tables into prawn pdf and / or where are the sample files?
Thanks for any help
Chris source share