Rails CGI calls

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

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.