I know how to get a .html file and writing contents into a file in the server.
doc = Nokogiri::HTML(open(“http://projectmadurai.org”).read)
my_file = File.new(“pm.html”, “w”)
I want to download a .pdf file in a similar way. How can I achieve this?