Displaying 7 results from an estimated 7 matches for "render_on".
2006 May 05
8
pdf/writer: table.render_on best practices?
Hi All,
I generate a pdf report that contains a table. The report is 14 pages, and
it takes 20s to be rendered. Most of these 20s are spend in the render_on
method. I wonder if it is possible to speed up that process?
To create the report, I do the following:
1) Setup pdf layout:
# Setup pdf layout
pdf.select_font("Helvetica", { :encoding => "WinAnsiEncoding"})
pdf.text " ", :font_size => 12, :justificat...
2006 Mar 10
5
PDF::Writer Simpletable Iteration
...adings = true
@items.each do |item|
@item_data = [
{ "item_code" => item.code,
"item_name" => item.name,
"item_desc" => item.desc,
"item_cost" => item.cost},
]
end
tab.data.replace @data
tab.render_on(_p)
end
send_data _p.render, :filename => "Item_List.pdf", :type =>
"application/pdf"
end
--
Posted via http://www.ruby-forum.com/.
2006 Jun 19
1
pdf simpletable help needed
...re ''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_data _pdf.render, :filename => ''hello.pdf'', :type =>
''application/pdf''
end
end
i couldn''t figure out a better way to get the data out of the user model
than looping through and adding the attributes to an empty array. then i
u...
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 Jun 08
0
SimplaTable with error: singleton can't be dumped
Hello,
My first PDF report from rails.
When i try to render "tab.render_on(pdf)", I get that error message.
Thanks any help,
Helder
=================================================================
TypeError in ContasController#plano
singleton can''t be dumped
RAILS_ROOT: script/../config/..
Application Trace | Framework Trace | Full Trace
/var/lib/ge...
2006 May 06
0
RE: Rails Digest, Vol 20, Issue 156
...<MyEntity>'' in consol
(Binil Thomas)
5. Pagination Question (Binil Thomas)
6. Re: rake doc:rails fails (Dave Thomas)
7. Re: posting xml in functional test (justin worrall)
8. depot test-driven development exercise (cremes.devlist@mac.com)
9. Re: pdf/writer: table.render_on best practices? (Nicolas Buet)
----------------------------------------------------------------------
Message: 1
Date: Sat, 6 May 2006 14:01:23 +0200
From: Paulie <pauliephonic@gmail.com>
Subject: [Rails] Re: Rails MySQL Stored Procedure Fun
To: rails@lists.rubyonrails.org
Message-ID: <...
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 ideas ? Anybody experienced the same issue ?
Is there any more friendly user and faste...