similar to: rails+prawnto: setting :type to :prawn in a #render_to_string call not working

Displaying 20 results from an estimated 3000 matches similar to: "rails+prawnto: setting :type to :prawn in a #render_to_string call not working"

2009 Mar 26
0
Prawn + PrawnTo + Rails 2.3.2
Hi, Have anyone made a successful usage of Rails 2.3.3 with PrawnTo and Prawn ? I followed all the tutorials I could find on Net, but I am not able to see pdf part working. I kept getting the error "Template is missing". I do have foo.pdf.prawn. Same goes with pdf/writer as well. Thank you. Regards Balaji D Loganathan Spritle Software, http://www.spritle.com -- Posted via
2010 Jan 02
0
Print a PDF directly after prawnto with iframes
Hi, I think I''m very near of accomplishing this but I have a problem. This is the code: <%- content_for :head do -%> <script type="text/javascript" charset="utf-8"> function printPDF(){ var pdf = document.getElementById("pdfDoc").contentWindow; pdf.focus(); pdf.print(); } </script> <%- end -%>
2010 Dec 01
1
Prawn : undefined method `make_table'
require ''prawn'' require ''prawn/core'' require ''prawn/layout'' Prawn::Document.new do |pdf| subtable = pdf.make_table([[ "foo", "bar" ], [ "baz", "bax" ]], :column_widths => [ 50, 50 ]) { column(0).background_color = "808080" cells.borders = []
2010 Aug 22
5
Help me... how to convert amchart to pdf
Hi Guys I need help.. I want to making 1 controller for covert html to pdf.. But that html have amchart (swf). When I tried convert, the swf not loadded... Any body can help me Please???? -- Senior Rails Developer Anton Effendi - Wu You Duan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send
2009 Mar 20
4
Reporting with Rails
Hi all, I was wondering how you guys generate reports from rails. I want to generate business reports in pdf format, and was wondering what you guys use. I have searched the web and found Ruport, but there isn''t much documentation or examples of real world business reports like jasperreports, for instance. Is it possible to generate good looking business reports with ruport? What other
2008 Oct 26
2
use Prawn to generate pdf
Hello: when i use Prawn to generate pdf file for download, i got a blank pdf file, can someone tell me why? require ''prawn'' class DownloadController < ApplicationController def download_pdf send_data(generate_pdf, :filename => ''test.pdf'', :type => ''application/pdf'') end private def generate_pdf
2009 Mar 23
6
PDFs prawn gem freeze into the app...
I was having great success with creating PDFs with prawn, I followed Ryan Bates latest screencast. All good. Trouble is when i come to deploy the app on my webhost I ran into trouble. Rails 2.3 app. I did, "sudo rake gem unpack prawn" to freeze it in. I put the app on my webhost but it won''t start, some error saying it can''t find prawn. Any ideas? (summary: works
2012 May 28
1
rendering a partial inside another using render_to_string and (:formats) in controller
I want to clean my code by moving the duplicated lines : partial = render_to_string( :partial => "#{file}", :formats => [:html] ) to the pagination_partials function. ================================================= WORKING CODE: ================================================= def render_format_search_partial(file, options={}) # TODO remove this line to use the one
2008 Feb 19
3
render_to_string in a controller test?
Hi all, I know that in general, view and controller tests should be isolated, such that controller specs don''t test views etc. However, I think I''ve run into a situation that might be an exception. My controller uses render_to_string to produce a chunk of HTML that it passes to a model to be processed. The controller then redirects the user to a different page. The
2007 Nov 30
5
render_to_string in an after filter
I''m using render_to_string in an after_filter, which renders a partial that is sent to a web service. Here''s the code: class MyController < ApplicationController after_filter :post_to_webservice def show # show logic end def post_to_webservice stuff = render_to_string :partial => ''stuff'' webservice_post(stuff) end I get a DoubleRenderError in the
2007 Apr 19
4
render_to_string in a model ?
I have a batch job that will call script/runner, I would like in this call to create html formated email and save it to the database. This is easy enough in a controller with yournewhost.email = render_to_string :action => "email_newhost_ready", :layout => false But render_to_string is only available in controller action pack, is there a easy way to render_to_string in a Model? Or
2007 Nov 25
2
Fwd: Render_to_string from a worker
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 -------------- next part -------------- An HTML attachment
2010 Jun 30
1
Prawn gem: How to create the .pdf from an *existing* file
Hi there, Can anybody show me (maybe copy/paste a simple code example) how to create the .pdf file from an existing (.xls) file, using the Prawn gem? Basically, I''d need the command that takes an existing (.xls) file to save it as a .pdf, afterwards. (I''m asking because the Prawn documentation at http://prawn.majesticseacreature.com/docs/ seems to be gone since quite a while -
2011 Mar 06
2
render_views and render_to_string
Hey guys. One of my controller actions uses #render_to_string to send back a JSON response. When I try to spec this, Ruby raises a NoMethodError, saying that #render_to_string doesn''t exist in my controller action. Here''s the controller action, spec, and output: http://pastie.org/1640962 Any idea what I''m doing wrong? Thanks, Nick -------------- next part
2011 May 17
1
rails render_to_string problem
Hi I`m trying to test my controller with rspec and always get an error. The error is in the render_to_string method call (without it test works fine). So could u please help me with that? users_controller.rb: def update @user.update_attributes!(params[:user]) redirect_to @user, :status => 202, :text => render_to_string(:partial => "users/show", :type =>
2009 Jan 27
6
German letter ä, ö, ü in rfpdf
Hi, I need PDF creation in Rails and decided for RFPDF. Everything works quite nice the only problem is that I can''t display ä,ö,ü in the pdf documents. I found a tutorial that says that I have to create a font config file with MakeFont. I did it, but now I don''t now where to put al this files. Does anyone has experience with creating PDFs in Rails with ä,ü,ö letters? Thx
2010 Nov 04
0
Re: Train wreck getting render_to_string to work from foreign controller [SOLVED]
Just for collective knowledge as I have found no info on this problem online: I solved this by adding an .html.erb file for the "missing template", since by design or bug Rails3 will not find or render another controllers view (in my experience). Then in the new html.erb file, I just put <%= render "comparisons/display" %> because the views *are* able to find templates
2006 Jul 05
3
Calling render_to_string from a view
I''m playing around with a list of todos, which I want to render as <ul>''s that can nest to an arbitrary level, so I wrote this as a helper method: def print_todo(t) str = "<ul>\n\t<li>" str += render_to_string(:partial => ''todo'', :object => t) + "\n" t.children.each { |c| str +=
2006 Jun 29
1
RCOM Package
Hi list, I just installed the rcom package and tried to read/give out some values from/to Excel. Altogether it works great... but nevertheless I don't know how the syntax works or in other words: "Which command needs which parameters?" Is there somwhere a manual about this package with good examples? I've read the Package description... but there are not really good
2011 Jun 14
3
Read in from multiple Excel wksheets
I?ve got an Excel workbook with about 30 worksheets. Each worksheet has 10000 rows of data over 30 columns. I?d like to read the data from each worksheet into a dataframe or matrix in R for processing. Normally, I use read.csv when interacting with Excel but I?d rather manipulate a multisheet workbook directly than set about splitting the original workbook and saving down each part as a csv.