I am using the following technologies:
- JRuby 1.7.4
- Rails 3.2.13
- Ubuntu 13.04
- DB2 C-Express
- Torquebox server 2.3.0
My goal is to make a simple controller which implements the following functions:
- Upload text files (MS Word format, Open Office or Libre Office formats)
- Perform a full text search on the uploaded files
- Display the text files in the browsers as PDFs
I have searched for gems that can help me to achieve that and have the following questions:
- What should be the column type of the field that is storing the text file. Generally, I supposed it should be binary type.
- Is it possible to perform full text search using Sunspot? As I have read, it seems to work with fields of type text, not binary.
- I read about two gems that allow me to generated PDFs. The Prawn gem, which adds more flexibility and the PDFkit which can generates PDFs from HTML pages. Can any of this be used to display the text file? I am supposing that I should first display somehow in HTML, and then use the PDF gem.
Has anyone done something like this and could you point me in the right direction?