[Rails] Re: How to open PDF file in browser ?

2012-11-07 Thread Sateesh
Just use this command : send_file(pdf_file_path, :type = 'application/pdf', :disposition = 'inline') On Thursday, June 18, 2009 9:41:17 PM UTC+5:30, Dharmdip Rathod wrote: Thanks , for your reply same thing is happen here but when i click on link to open pdf file browser automatically gives

Re: [Rails] Re: How to open PDF file in browser ?

2012-11-07 Thread Peter Hickman
This post was from 3 years ago. Please do not raise the dead. On 5 November 2012 07:15, Sateesh sateesh.chaduv...@gmail.com wrote: Just use this command : send_file(pdf_file_path, :type = 'application/pdf', :disposition = 'inline') On Thursday, June 18, 2009 9:41:17 PM UTC+5:30, Dharmdip

[Rails] Re: How to open PDF file in browser ?

2012-11-07 Thread Rajesh reddy
give :disposition = 'inline' in your controllers On Thursday, June 18, 2009 4:17:02 AM UTC+5:30, Dharmdip Rathod wrote: Please help me , How to open .pdf extension file in browser ? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

Re: [Rails] Re: How to open PDF file in browser ?

2012-11-07 Thread Jordon Bedwell
On Wed, Nov 7, 2012 at 10:21 PM, Rajesh reddy rajeshn...@gmail.com wrote: give :disposition = 'inline' in your controllers There are several quirks with sending inline to most browsers (for example if I remember right Firefox is still plagued by not using the name you set for inline) and IE has

[Rails] Re: How to open PDF file in browser ?

2009-06-18 Thread Colin Law
2009/6/17 Dharmdip Rathod rails-mailing-l...@andreas-s.net: Please help me , How to open .pdf extension file in browser ? Just put the pdf in your railsapp/public folder and provide a link to it. So if file is railsapp/public/myfile.pdf provide a link to /myfile.pdf Colin -- Posted via

[Rails] Re: How to open PDF file in browser ?

2009-06-18 Thread Dharmdip Rathod
Thanks , Colin Basically i am passing file name in URL , that's way i am trying to open file in browser and i can not find more help regarding this topic and i have seen this functionality in http://www.meetup.com/SV-SBRG/files/ .It's working fine i do not think for this they have

[Rails] Re: How to open PDF file in browser ?

2009-06-18 Thread Colin Law
2009/6/18 Dharmdip Rathod rails-mailing-l...@andreas-s.net: Thanks , Colin         Basically i am passing file name in URL , that's way i am trying to open file in browser and i can not find more help regarding this topic and i have seen this functionality in

[Rails] Re: How to open PDF file in browser ?

2009-06-18 Thread Dharmdip Rathod
Thanks Colin , But when i choose this option pdf file opens in pdf viewer application , but it does not open in browser it opens like desktop application and when i try to open it with firefox , it gives following error ! C:\DOCUME~1\hb56\LOCALS~1\Temp\1_product-2.pdf could not be opened,

[Rails] Re: How to open PDF file in browser ?

2009-06-18 Thread Colin Law
2009/6/18 Dharmdip Rathod rails-mailing-l...@andreas-s.net: Thanks Colin , But when i choose this option pdf file opens in pdf viewer application , but it does not open in browser it opens like desktop application and when i try to open it with firefox , it gives following error !  

[Rails] Re: How to open PDF file in browser ?

2009-06-18 Thread Dharmdip Rathod
Thanks Colin , When i put one file in public folder and after accessing thought URL it opens in browser now i know what happens . I have used attachment_fu for file uploading, and files is stored here (/groups_file/000/0045/test.pdf) so i need to make URL pertaining to this path that's

[Rails] Re: How to open PDF file in browser ?

2009-06-18 Thread pharrington
Easiest way to ask the browser to simply display a file instead of downloading it is to do the following in your controller's action: send_file(path, :type = 'application/pdf', :disposition = 'inline') The :disposition is the important part; typically you'll be setting this to either 'inline'