New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pdf2img-paperclip-processor

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdf2img-paperclip-processor

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Ruby on Rails 4 Paperclip pdf to img Processor

This gem is a simple Paperclip processor which uses rmagick/ImageMagik to convert uploaded pdf files to a image file. This processor supports multiple pages

Requirements

  • Paperclip ~> 5.0.0
  • rmagick 2.16.0

Installation

This gem is written and tested on Ruby on Rails 4 only. However, this could work on other versions as well provided that paperclip and rmagick is working.

In order to install it, add

gem 'pdf2img-paperclip-processor'

to your Gemfile and run

bundle install

in your console. Bundler should take care of all the rest.

or else, you can just download the file and copy it to paperclip processors folder of your project.

rmagick Instalation

Install rmagick from source or using your favorite package manager.

Various Linux distributions should use similar methods with their respected package managers.

Using Processor

Use it as you would any other Paperclip processor. In your model:

class Document < ActiveRecord::Base
  
  has_attached_file :pdf,
          :styles => { :final_doc => {:format => "png"}},
          :processors => [:pdf2img]      

                  

which will convert your pdf document into a png, and keep both files (.png and .pdf) on the server

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 23 Jan 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc