Are there methods in using rails to convert document files into image in order to display them as jpg or png. Perhaps there is a gem that can handle this

convert document files into image


Here are some common ones:

  • RMagick (probably most advanced one
  • ImageScience
  • MiniMagick

PS: you can convert PDFs to JPG to using RMagick :)

Converting MS Office Documents to images can be done using OpenOffice - here are two solutions:

  • JODConverter
  • Convert to PDF (using CUPS-PDF printer driver) like:
openoffice.org2.4 -norestore -nofirststartwizard -nologo -headless -pt Cups-PDF sample.ppt

and then you can convert the PDF to an image.

JODConverter -- is an excellent solution. (but im not sure how would you implement the line 'openoffice.org2.4 -norestore -nofirststartwizard -nologo -headless -pt Cups-PDF sample.ppt' in a rails app, maybe i should just learn about CUPS-PDF) you got an up one from me