Printing the PDF in new window

Hi,

I am working on printing the PDF in rails. I am using the send_data method to achieve this.

I need the following functionality to be done.

When I click on "Print PDF" icon, a new window or tab should be opened and the result PDF content should be opened in the new window or tab(Currently it is working in the same window in which I have the "Print PDF" icon).

How can I do this?

Thanks in advance...

Check this out :

<%= link_to 'Print PDF',{:action => 'print_now', :id => @doc.id, :popup => ['new_window','height=550,width=550'] %>

Cheer, Reinhart http://teapoci.blogspot.com

Check this out :

<%= link_to 'Print PDF',{:action => 'print_now', :id => @doc.id}, :popup => ['new_window','height=550,width=550'] %>

Cheer, Reinhart http://teapoci.blogspot.com

Can I implement the same requirement for link_to_remote tag? But :popup is not working.

Is there any way to implement this for link_to_remote tag?

My script above is working with me

<%= link_to 'Print PDF',{:action => 'print_now', :id => @doc.id}, :popup => ['new_window','height=550,width=550'] %>

You can use it for link_to_remote, check this out :

http://www.ruby-forum.com/topic/112989