Forum: Ruby on Rails Rails CGI calls

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Steven Heimann (Guest)
on 2006-03-20 04:17
I apologise in advance for this newbie question but I am still waiting
to receive some books on ruby & rails and I can't find the solution
online.

I am learning rails, (and since rails is the only thing I have used that
is based on ruby I am also learning ruby,) by developing a small
application for work to index and serve up images from a document store.
The documents are stored as tiff files.

I simply want to code a link that will call imagemagick to convert the
file to say a pdf and then serve up that file to the user.  I could
probably do this in php, having done something similar in the past, but
that seems a shame as I am sure it could be done in ruby and possibly
using modules already in the rails framework.

It might also be nice to be able to convert the image file to a jpeg on
the fly and serve it up inline with the info from the database.

Any advice on how to do this or where to look for helpful documentation
would be much appreciated.

Thank you
Steven
Paul R. (Guest)
on 2006-03-20 12:00
(Received via mailing list)
On 20 Mar 2006, at 02:17, Steven Heimann wrote:

> I simply want to code a link that will call imagemagick to convert the
> file to say a pdf and then serve up that file to the user.

Sounds like you need PDF::Writer:

http://ruby-pdf.rubyforge.org/pdf-writer/

And RMagick:

http://rmagick.rubyforge.org/

And then a read through of this section of a PDF::Writer tutorial:

http://www.artima.com/rubycs/articles/pdf_writer2.html

Hope that helps.

--
Paul R.
This topic is locked and can not be replied to.