link_to_print is a Rails plugin which provides a link helper to assist in creating links to print remote pages. I created it initially to allow printing one controller action from another.
script/plugin install git://github.com/teejayvanslyke/link_to_print.git
In your view file, use link_to_print as you would link_to_function:
link_to_print "Super Trendy Report", :url => report_path(@super_trendy_report) link_to_print "Sweet News Article", :url => "http://articles.com/xyz-article"
The link will prompt the user with a print dialog box to send the contents of URL specified to their printer.
link_to_print embeds an <iframe> tag into the document upon clicking and loads the supplied URL. It then calls window.print() in the context of the <iframe>'s window.