
Documentation out of date
Reported by Anko Painting | June 17th, 2009 @ 07:05 PM
I can't create a table as described here: http://prawn.majesticseacreature.com/
with version 0.4.1
---------------- start paste
-- Flexible table drawing
Prawn has built in support for rendering text in the form of tables, providing basic reporting functionality. This lets users focus on customizing their documents rather than forcing them to write a ton of low level graphics drawing code.
Prawn::Document.generate("fancy_table.pdf") do
data = [["Gregory Brown", "gregory.t.brown@fakemail.test" ],
["James Healy" , "jimmy@fakemail.test" ],
["Ross Perot" , "ross@fakemail.test" ],
["Al Gore" , "al@fakemail.test" ],
["Ralph Nader" , "ralph@fakemail.test" ]]
table data,
:position => :center,
:headers => ["Name", "Email"],
:row_colors => ["ffffff","ffff00"],
:vertical_padding => 5,
:horizontal_padding => 3
end
------------- end paste
This code does not work, table is not a method of Prawn::Document
Please update this doco :)
Comments and changes to this ticket
-
Anko Painting June 17th, 2009 @ 07:20 PM
actually after more digging, i found you need prawn-layout. This needs to be made more clear to the user.
-
Anko Painting June 17th, 2009 @ 10:21 PM
gosh! prawn has updated to 0.5.x which has the required dependancies!
You can probably code this job.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป