thumbkit icon indicating copy to clipboard operation
thumbkit copied to clipboard

Add PDF support

Open quinn opened this issue 13 years ago • 1 comments

Hi, I was considering how to create image thumbnails for my pdf uploads using carrierwave. It seems there is a plan to support this within this project.. I know it isn't implemented yet, but have you thought at all how it would work? Let me know and I'd be happy to try and implement it.

quinn avatar Oct 10 '12 17:10 quinn

Hi @quinn, I haven't thought specifically on how creating pdf thumbnails would work. I imagine I would start by tinkering with imagemagick to see what works.

I won't be able to work on this in the near future, so go for it. Take a look at lib/thumbkit/processor/text.rb for an example, I think it should get you pretty close. In fact, you may be able to use Thumbkit::Processor::Text to thumbnail pdfs. Just try mapping the .pdf extension by adding

  'pdf' => 'Text',

to lib/thumbkit/processor.rb.

Good luck, and let me know what you come up with.

amiel avatar Oct 10 '12 17:10 amiel