Convert PDF uploads to Images
Reported by Brian Michalski | June 5th, 2010 @ 01:57 PM
PDF file uploads should be converted to images which can be displayed. The pdf file should be saved as the 'original' and the converted image should be stored as the 'image'. Concerto 1.x uses a command line utility to do this, possibly pdf2jpg?
These sort of upload conversions should NOT be in the controller, preferably in a library or module so additional conversions can easily be added.
Comments and changes to this ticket
-
Brian Michalski June 5th, 2010 @ 01:59 PM
- Tag changed from v2 to pdf, upload, v2
-
August April 12th, 2011 @ 04:22 PM
- Milestone order changed from 0 to 0
This could probably just be resolved by using RMagick. I just tested the following code which seemed to accomplish what you want.
pdf = Magick::ImageList.new("test.pdf")
pdf.write("test.jpg")Multi-page pdfs get named test.jpg.0 etc
-
Brian Michalski April 12th, 2011 @ 08:44 PM
Nice find August! This is much cleaner than our command-line system call a la V1.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Concerto is an open source digital signage system that makes it easy to engage a large community of people with graphical and text-based announcements, bulletins, and other messages... but enough about us, you came here to get involved.
<br />
If you think you've <b>found a bug in Concerto</b>, please click 'Create new ticket' and let us know about it.
<br />
Looking to peek at our source code? Head to <a href="https://github.com/concerto/concerto_v1">https://github.com/concerto/concerto_v1</a> (Concerto version 1) or <a href="https://github.com/concerto/concerto">https://github.com/concerto/concerto</a> (Concerto version 2).
<br />
Our getting started guide is available here: <a href="https://github.com/concerto/concerto/wiki/Getting-Involved">https://github.com/concerto/concerto/wiki/Getting-Involved</a>.