[Backgroundrb-devel] Fwd: Render_to_string from a worker
felixclack at gmail.com
Tue Nov 27 23:40:57 EST 2007
I found the plugin and explanation how to use it at
It registers the extension .rpdf to trigger code in the pdfrender plugin.
I use similar view code to produce a set of addresses for avery labels as in
the example blog post.
I have a controller action that prepares the data for the labels, I use
render_to_string to create and save the pdf based on the view code, and then
send an email with the newly created pdf attached.
This works fine when triggered manually from my app, however I came unstuck
when trying to implement this same process in a worker.
I hope this makes sense. Not sure if this is the best way to do what I'm
trying to achieve but pdfrender was the first solution where I could
understand how it all came together.
Any help on getting this running in a worker would be appreciated.
On 25/11/2007, hemant kumar <gethemant at gmail.com > wrote:
> You are using render_to_string for generating pdf? You must be using one
> of those groovy plugins i suppose.
> Well if, yes... i suppose, it would be available in worker as well...
> But can't say much unless i know, which plugin you are using and
> On Sun, 2007-11-25 at 12:43 +1100, felix clack wrote:
> > Hi,
> > I am trying to generate a PDF from within a worker using PDF::Writer.
> > In my controller I use render_to_string to create the pdf file however
> > from what I understand render_to_string can only be used from a
> > controller.
> > Does anybody have any suggestions how I might be able to replicate
> > this functionality in a worker?
> > --
> > thanks,
> > Felix
> > _______________________________________________
> > Backgroundrb-devel mailing list
> > Backgroundrb-devel at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/backgroundrb-devel
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Backgroundrb-devel