With other uploaders in rails, it's not super straightforward to convert a PDF to an image. But, by using Dragonfly's ImageMagick plugin, it's real simple.
Make sure you're using the ImageMagick plugin.
And you'll want GhostScript installed on your machine.
The markup for it, though is simple. If you want a small,
200x200 thumbnail of a pdf, it's as simple as the following.
<%= image.image.thumb('200x200#', :format => 'png', :frame => 0).url %>
Note: This assumes you have an
image object that has an uploader mounted to an
image accessor. You'll want to update to your application.
Want to receive approximately one email every month with new articles, tools, and references I've discovered? Sign up below.