Closed josal closed 11 years ago
Hi,
There is no support for such thing. You will need to steam the s3 object to a temp file, something like:
require 'tempfile'
Tempfile.new('tmp_pdf_file') do |file|
S3Object.stream('s3key', 's3bucket'){|chunk| file.write chunk }
file.close
RGhost::Convert.new(file.path).to :png, :filename => "/path/to/image.png"
end
Thx
Hi,
I've sucessfully used the convert method in local, with pdfs in my system. Now, in production, I have the pdf files in memory or in S3.
I haven't been able to use StringIO or similar as the first argument.
How could I convert a pdf to images if the source file is not saved in my machine - is in memory or in S3?
Thanks in advance and congrats for this useful gem.
Jose.