Dan Mansfield wrote:
> 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.

SO CLOSE!

By doing a binary compare of a working version downloaded through the 
browser and the one through Mechanize, I have found that it is saving 
the line breaks as 0D 0A in hex versus just 0A in the working file.

Whilst I dig around to find how to avoid Mechanise/Ruby using that 
behaviour. Has anyone else come across this and have a solution?
Thanks

-- 
Posted via http://www.ruby-forum.com/.