You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP

docsplit-paperclip-processor

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docsplit-paperclip-processor

0.2.2
Version published
Maintainers
1
Created

Ruby on Rails 3 Paperclip Docsplit Processor

This gem is Paperclip processor, utilizing Docsplit in order to convert uploaded files to pdf and extract information/thumbnails. These include the Microsoft Office formats: doc, docx, ppt, xls and so on, as well as html, odf, rtf, swf, svg, and wpd.

Requirements

Installation

(This gem is written and tested on Ruby 1.9 and Rails 3 only).

In order to install it, add to your Gemfile:

gem 'docsplit-paperclip-processor'

And then run:

bundle install

Using Processor

Use it as you would any other Paperclip processor. For example, in your model:

class Document < ActiveRecord::Base

  has_attached_file :file,
                    :styles => {
                      :pdf => {
                        :format => "pdf",
                        :processors => [:docsplit_pdf]
                      }
                    }

end

which will convert your document into pdf.

Extract text

WARNING: This feature is in alpha.

class Document < ActiveRecord::Base

  has_attached_file :file,
                    :styles => {
                      :text => {
                        :processors => [:docsplit_text],
                        :full_text_column => :file_full_text
                      }
                    }

end

will extract the text from the file uploaded, and desposit the full text of the file into the column 'file_full_text'.

Extract metadata and thumbnail

Will be include in the next releases.

Release info

Be warned, this gem is released as early beta version. If you are using it you are doing so on your own responsibility.

Have fun with it and drop me a note if you like it.

FAQs

Package last updated on 18 Aug 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts