<span class="gmail_quote"></span>Hi Hemant,<br><br>I found the plugin and explanation how to use it at <a href="http://blog.nicksieger.com/articles/2006/05/26/rails-is-simpler-than-office" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://blog.nicksieger.com/articles/2006/05/26/rails-is-simpler-than-office
</a><br><br>It registers the extension .rpdf to trigger code in the pdfrender plugin. <br>I use similar view code to produce a set of addresses for avery labels as in the example blog post.<br><br>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.
<br><br>This works fine when triggered manually from my app, however I came unstuck when trying to implement this same process in a worker.<br><br>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.
<br><br>Any help on getting this running in a worker would be appreciated.<br><br>thanks<br>Felix<div><span class="e" id="q_11675f07375a9f6b_1"><br><br>
<div><span class="gmail_quote">On 25/11/2007, <b class="gmail_sendername">hemant kumar</b> <<a href="mailto:gethemant@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">gethemant@gmail.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You are using render_to_string for generating pdf? You must be using one<br>of those groovy plugins i suppose.<br><br>Well if, yes... i suppose, it would be available in worker as well...<br>But can't say much unless i know, which plugin you are using and
<br>stuff...<br><br><br>On Sun, 2007-11-25 at 12:43 +1100, felix clack wrote:<br>> Hi,<br>><br>><br>> I am trying to generate a PDF from within a worker using PDF::Writer.<br>> In my controller I use render_to_string to create the pdf file however
<br>> from what I understand render_to_string can only be used from a<br>> controller.<br>><br>><br>> Does anybody have any suggestions how I might be able to replicate<br>> this functionality in a worker?
<br>><br>> --<br>> thanks,<br>> Felix<br>> _______________________________________________<br>> Backgroundrb-devel mailing list<br>> <a href="mailto:Backgroundrb-devel@rubyforge.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Backgroundrb-devel@rubyforge.org
</a><br>> <a href="http://rubyforge.org/mailman/listinfo/backgroundrb-devel" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://rubyforge.org/mailman/listinfo/backgroundrb-devel</a><br><br></blockquote>
</div><br><br clear="all"><br></span></div>-- <br>thanks,<br><span class="sg">Felix
</span><br clear="all"><br>-- <br>thanks,<br>Felix