I tried this too:
File.open('myfile.pdf', 'w+') do |file|
file << page.body
end
Which almost works but presents a corrupt pdf file. I can see the
document properties of the pdf file but there is no content.
I have also tried using:
agent.pluggable_parser.pdf = Mechanize::FileSaver
agent.click(link)
which did not produce an error but also did not produce a pdf file
either.
--
Posted via http://www.ruby-forum.com/.