Displaying 20 results from an estimated 10000 matches similar to: "PDF and Ruby on Rails"
2012 Jan 31
4
Connect with MySql and Ruby
Hi everybody,
I am very new in Ruby on Rails.
I install ruby(1.9.2p180) and Rails(3.1.3). Also I install RubyMine3.1.1
as IDE.
I successfully have done some simple simple practices. Now I want to
play with database(mysql).Though I have checked so some of the URLs but
unable to make out.
Please help me how to do that, what files or folders should I place
and where should I place those.
2012 Feb 02
3
problem in mysql and ruby data fetching
Hi,
Just yesterday I successfully installed ruby in my pc, means I am
new in this technology.
Today I am trying to fetch the data in my ruby application and
successfully done this. Now I want to speed up the performance of the
fetching data by making use of prepare and execute method.In case of
select query also I am using this like
require ''mysql''
mysql =
2006 May 05
5
Attach a PDF File to an Email
Hello ~
I have an email that I need to attach a PDF to. The email is being
sent, and a file is attached but it is not the original file. I am
following the example:
attachment :content_type => "image/jpeg", :body => File.read("an-image.jpg")
changing it to:
attachment :content_type => "application/pdf", :body => File.read("pdf/my.pdf")
2010 Jun 03
1
need to save generated pdf in public folder
hai
im ruby on rails developer, im integrating princely plugin and prince
software to my rails application
i have generated pdf file successfully using the following code
princely = Princely.new()
html_string = render_to_string(:template => ''test_methods/
visual_test/generate_report.rhtml'', :layout=> false)
send_data(
2010 Apr 29
2
send_data => invalid byte sequence in US-ASCII
I''m trying to display a generated .png plot via send_data(), but it
results in a server error "invalid byte sequence in US-ASCII" error.
I''m pretty sure this means that I need to specify the encoding
somewhere, but I haven''t been able to figure out where or how to do so.
Some particulars:
I''m running gnuplot through a pipe to generate a plot in .png
2012 Sep 11
10
wickedpdf
Hi all i''m trying to generate pdf and i got this error
Location of wkhtmltopdf unknown and i also get
Bad wkhtmltopdf''s path
gpa/vendor/plugins/wicked_pdf/lib/wicked_pdf.rb:26:in `initialize''
/EDWARD/_gpa/vendor/plugins/wicked_pdf/lib/pdf_helper.rb:53:in `new''
/EDWARD/gpa/vendor/plugins/wicked_pdf/lib/pdf_helper.rb:53:in `make_pdf''
2005 Sep 22
0
All caps in controller names
Are controller names allowed to have all caps, like PDFController?
I created a controller called PDFController with the generator and it croaks
with an unknown constant PdfHelper error. Is that not the convention?
I reported this as a bug, but now I''m not so sure because the wiki doesn''t
recognize PDFController as a valid wiki word.
-Jeff
2010 Nov 03
2
send_file but not send_data?
So this is the original code I used, and it worked
send_file ''vendor/sprites/not-found.png'', {:filename =>
"sprite-not-found.png", :type => "image/png", :disposition => "inline"}
Now I switched it to this (going to be adding imageMagick)
send_data File.read(''vendor/sprites/not-found.png''), {:filename =>
2006 Jan 04
4
How to open a pdf file in new window
Hi all
I made a pdf file in ruby and to display it used the method send_data
like
#
send_data pdf.render, :filename => "Hello.pdf",:type =>
"application/pdf"
#
Now I want to open it in another window or as a popup. How can I achieve
it?
Thanks to all.
Sainaba.
--
Posted via http://www.ruby-forum.com/.
2012 Mar 13
1
send_data always sends xml file?
I''m trying to use send_data to send a simple text file.
Every reference I can find says I can supply a MIME type with the
":type" option and that will determine the kind of file I get on the
machine that downloads the file I''m sending. Instead I ALWAYS get an
XML file.
here''s the code snippet:
File.open(@temp_download_file_path, ''r'') do
2008 Jul 14
0
How to Send Itext Generated PDF to Browser?
I am still attempting to figure out how to send an Itext generated pdf
Document to the browser.
I am looking at the following blog posting where someone is using jruby
and iText to create a pdf file and then sending it to the browser :
http://codersifu.blogspot.com/2007/06/howto-generate-pdf-files-in-ruby-on.html
Unlike the above example I am using only ruby / on rails.
I would like to do
2010 Feb 24
6
Yet another send_data :image question...
Guys & gals,
I''m also learning RoR (using v2.3.4). I''ve got a basic scaffold
working for image file creation, and - to a point - image file
display.
The send_data function is working in my controller - no problem. The
model code is able to parse the uploaded file construct too.
def show
@image = Image.find(params[:id])
send_data(@image.binary_data, :type =>
2008 Sep 08
2
Problems with async worker request
Sorry if this comes through twice. I already sent this once, before joining
the mailing list.
I''m attempting to use Backgroundrb to handle asynchronous pdf creation, but
in doing so, I''ve run into a very strange problem. Below is a method that''s
called from the controller which creates a new worker, then grabs the worker
and calls the ''build_pdf''
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 Dec 24
2
Showing graphs on browser with gruff lib.
Hi,
I am using "gruff" lib for creating the graphs.
I have got the success to create the graph, but my problem is I don''t
want to store it, I want that they should be displyed on the browser it
self.
I have tried this:-
"
send_data(g.to_blob, :disposition => ''inline'', :type => ''image/png'',
:filename =>
2010 Feb 02
3
Generating a PDF using popen and wkhtmltopdf
As described on wkhtmltopdf Google group
(http://code.google.com/p/wkhtmltopdf/issues/detail?id=162), I have a
problem generating a PDF while using popen and wkhtmltopdf.
wkhtmltopdf takes HTML code as input and ouputs a PDF file. Here is what
I''m doing:
command = ''"C:\Program Files\wkhtmltopdf\wkhtmltopdf.exe" - - -q''
IO.popen(command,
2009 Oct 12
3
[LLVMdev] Accessing Loop Variables
Hi,
How do I access the loop variables in a loop.
for(i = 0; i < N; i++)
for(j = 0; j < M; j++)
A[i][j+k] = i + j;
Is there anyway for me to know that in A[i][j+k], i & j are loop variables
whereas k is not!
Regards,
Prasenjit Chakraborty
Performance Modeling and Analysis
IBM Systems & Technology Lab
2010 Mar 09
4
edit existing PDF as template
Hi,
I am new to rails. I need to edit an existing pdf file and fill in some
data and send it to browser, how to implement this? Is there an example
online I can look at it?
Thanks!
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2009 Jan 12
2
error messgae
Hello,
I am having problems getting one xlite clients to communicate through
asterisk. I am getting an error message:
chan_sip.c:15593 handle_request_register: Registration from '"chinmay
chakraborty"<sip:1234 at 10.44.32.193 <sip%3A1234 at 10.44.32.193>>' failed
for '10.44.32.193' - No matching peer found
sip show peers
Name/username Host
2006 Nov 04
0
UTF-8 String to PDF using PDF::Writer
Hi
I just can''t seem to figure this out.
I know that PDF doesn''t support UTF-8 so I''m trying to use Iconv to
convert the string from UTF-8 to MacRoman (or anything that will
work). This doesn''t seem to be working though. Is there a better/
correct way to do this? The sting is stored as UTF-8 in MySQL and
displays properly on the web (<?xml