From: Erwin Date: 2008-05-07T22:20:05+09:00 Subject: Re: display the cover page of a pdf document in jpg or png On 6 mai, 23:24, Tim Hunter wrote: > Erwin wrote: > > I would like to display in my app the image of the cover page af an > >pdfdocument produced internnally within my app ( wich plugin should > > be better ... ? pdfwrite ?... generally it will be a less than 2 pages > > document) > > on the home page I would like to display the cover pages as png or jpg > > with a link to the document or another action... > > > thanks for your suggestions > > > erwin > > RMagick can convert aPDFto either PNG or JPG. If you just want the > first page, add [0] to the file name when you read thePDF, i.e. > > img = Magick::Image.read("mystuff.pdf[0]").first > img.resize!(how-big-you-want-your-image-to-be) > img.write("mystuff.png") > > -- > RMagick:http://rmagick.rubyforge.org/ > RMagick 2:http://rmagick.rubyforge.org/rmagick2.html Thanks a lot ! that's exactly what I want to do...