search for: column_ord

Displaying 3 results from an estimated 3 matches for "column_ord".

Did you mean: column_for
2006 Mar 10
5
PDF::Writer Simpletable Iteration
...xcept 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 = "Item List" tab.column_order.push(*%w{item_code item_name item_desc item_cost}) tab.columns["item_code"] = PDF::SimpleTable::Column.new("item_code") { |col| col.heading = "Code" } tab.columns["item_name"] = PDF::SimpleTable::Column.new("item_name") { |col| col...
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
2006 May 05
8
pdf/writer: table.render_on best practices?
...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.render_on(pdf) 7) I send the file with send_file Steps 1,2,3,4,5 and 7 takes less than 2 sec altogether. Step 6 takes about...