blob to file
Hi everyone,
I have a bunch of pdf files stored in a database (blob field) and now i
am asked to "transform" them into file system.
Is there any way to do that;
I tried something along the lines of
FileObject.find(:all).each do |fo|
f = File.new("#{fo.name}" + ".pdf", "w")
f << fo.file_field
f.close
f = nil
end
The files get created but when i try to open the newly pdf file created
they are blank (just blank pages in each doc)
Any ideas on this; any input is appreciated.
--
Posted via
http://www.ruby-forum.com/.
.
Relevant Pages
- Re: Problems with BindIFilterFromStream
... becoming a personal vendetta! ... several hundred pdf files, and it would be a bit of a performance ... concern to have to pull all of them down to the file system to index ... (microsoft.public.dotnet.framework.interop) - Re: PDF file database
... to be created to manage PDF files? ... off-site in a hierarchical database structure for safe keeping. ... For such a simple hierarchy the file system should be ... (comp.text.pdf) - PDF files
... I have two pdf files that I simply cannot move into my file system so that I can add the page to my website. ... Authors - if authoring against a web server, please contact the webmaster for this servers site. ... The pdf files were created in Word and do contain some charts and graphics that are necessary to the document. ... (microsoft.public.frontpage.client) - Is this possible?
... I was wondering if it was possible to convert pdf files back to dvi format? ... I have an e-book which I would like to correct, transform, update and stuff ... (sci.math) - Re: Is this possible?
... >I was wondering if it was possible to convert pdf files back to dvi format? ... >I have an e-book which I would like to correct, transform, update and stuff ... (sci.math) |
|