search for: simpletable

Displaying 7 results from an estimated 7 matches for "simpletable".

Did you mean: sampletable
2006 Mar 10
5
PDF::Writer Simpletable Iteration
...collection of items and output them in a table format. The way I have tried it so far only returns the last item in the collection - every other variation I have tried errors out. All of the documentation I can find only deals with static data, manually entered in the controller when using the Simpletable class. It is working, except only the last item in the collection shows in the generated PDF. Any ideas? My code follows: def pdf @item = Item.find(:all) _p = PDF::Writer.new _p.select_font ''Times-Roman'' PDF::SimpleTable.new do |tab| tab.title = "I...
2006 Jun 19
1
pdf simpletable help needed
i am trying to generate a pdf of all of the users in an application that i have built. i am still pretty new to ruby and rails so i don''t know the best way to go about it. here is my controller code: require ''pdf/writer'' require ''pdf/simpletable'' class ReportsController < ApplicationController def test _pdf = PDF::Writer.new table = PDF::SimpleTable.new user_data = [] for user in User.find(:all) user_data << user.attributes end table.data = user_data table.render_on(_pdf) send_da...
2006 May 24
4
pdf on the fly
In my rails app I need to create pdf reports on the fly. I have installed railspdf, wich is working fine. But, how can I create tables and paragraphs and stuff? Can I mimic an .rhtml file (using <% for ...%> etc? Or is it wise to use Ruby::PDF directly? Is there anyone out there with experience in this, and who is willing to share his findings? Thx -- Posted via
2007 Oct 11
0
pdf-writer - SimpleTable - change font betweent columns
...888-333-3333 555 W. 55th Street 222 W. 55th Street Somewhere, Somestate 999999 Somewhere else, State 444555 They also want "From" and "To" to be bold, and the rest of the information to be normal font (not bold). I am using pdf-writer and SimpleTable to get the layout situated correctly, but how do I make just the "From" and "To" bold font? Is there a better way to do this with pdf-writer? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you...
2006 Jan 24
4
PDF::SimpleTable performance issues
Hello, I am having performance issues ending with a ''time out'' from Apache when I try to generate a PDF file using pdf-writer. It seems to happen at the render_on(pdf) function call ; the table I am trying to draw has 8 colums which values are generated on the fly. Can''t find anything about pdf-writer and the ''time out'' on the Web so far. Any
2006 May 05
8
pdf/writer: table.render_on best practices?
...t_height(s) * 1.01) pdf.line(x, y, w, y).stroke y = pdf.absolute_bottom_margin + pdf.font_height(9) - 2 pdf.line(x, y, w, y).stroke pdf.restore_state pdf.close_object pdf.add_object(heading, :all_pages) end 2) create a table: table = PDF::SimpleTable.new 3) populate the table table.data = dataArray 4) set which rows are displayed, and in which order: table.column_order = rows (Note: only some rows are displayed) 5) I set the width: table.width = pdf.absolute_right_margin - pdf.absolute_left_margin 6) I call table.render_on(pdf): table.rende...
2007 Jun 08
0
SimplaTable with error: singleton can't be dumped
...:in `start_transaction'' /var/lib/gems/1.8/gems/transaction-simple-1.4.0/lib/transaction/simple/group.rb:102:in `each'' /var/lib/gems/1.8/gems/transaction-simple-1.4.0/lib/transaction/simple/group.rb:102:in `start_transaction'' /var/lib/gems/1.8/gems/pdf-writer-1.1.3/lib/pdf/simpletable.rb:397:in `render_on'' app/controllers/contas_controller.rb:64:in `plano'' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send'' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters...