From: Joel VanderWerf Date: 2006-11-17T08:03:04+09:00 Subject: Re: Another IO.popen question ... Adam Groves wrote: > Hi Joel, > > thanks for the speedy reply! The problem is, I need to pass on a file > object (which has been uploaded from a web page form) to 'convert' and > not just a path. I should have made this clearer in my original post. > > Any ideas? > Untested, but maybe something like this? file = File.open("mypdf.pdf") IO.popen("convert -resize 700x700 pdf:-[0] png:-") do |f| while (data=file.read(N)) f.write data end end -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407