# How to open Pdf or doc file in firefox

**URL:** <https://www.ruby-forum.com/t/how-to-open-pdf-or-doc-file-in-firefox/185744>\
**Category:** Rails\
**Created:** [March 25, 2010, 2:17pm UTC](https://www.ruby-forum.com/t/how-to-open-pdf-or-doc-file-in-firefox/185744 "2010-03-25T14:17:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [March 25, 2010, 2:17pm UTC](https://www.ruby-forum.com/t/how-to-open-pdf-or-doc-file-in-firefox/185744/1 "2010-03-25T14:17:17Z")

</div>

Hello champs,

Currently i have given a link to my document as like:-  
‘/controller/action/holidaylist.xls’ and i have placed this file in my  
own created directory ‘ABC’ at RAILS\_ROOT only.

And in my controller, i have written like:-

send\_data(File.read("#{RAILS\_ROOT}/ABC/" + file\_name),  
:file\_name =\> file\_name  
:disposition =\> “inline”)

Now whenever i clicked it, my firefox browser prompts a window to open  
it. That is something i do not want. I want to view it in browser only…

Can someone light me some direction over it so that i can move forward  
… ?

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [March 25, 2010, 2:37pm UTC](https://www.ruby-forum.com/t/how-to-open-pdf-or-doc-file-in-firefox/185744/2 "2010-03-25T14:37:57Z")

</div>

On 25 March 2010 13:17, Hemant B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ```
> :disposition => "inline")
> 
> ```
> 
> Now whenever i clicked it, my firefox browser prompts a window to open  
> it. That is something i do not want. I want to view it in browser only…
> 
> Can someone light me some direction over it so that i can move forward

In the prompt window in FF there should be a checkbox ‘Do this  
automatically for files like this from now on’ or something similar.  
Check that and the file should open without prompting.

Colin

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [March 25, 2010, 4:32pm UTC](https://www.ruby-forum.com/t/how-to-open-pdf-or-doc-file-in-firefox/185744/3 "2010-03-25T16:32:31Z")

</div>

Colin L. wrote:

> On 25 March 2010 13:17, Hemant B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > ï¿½ ï¿½ ï¿½ ï¿½ ï¿½ ï¿½:disposition =\> “inline”)

Hello colin,

Thanks for a quick reply. But i do not want this to be happen in my  
firefox only. I want this to be happen in every application which are  
using my application…

Hope you got me right…  
And yes i got to know that there are so many ways with which you can  
configure this on your machine only.

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [March 25, 2010, 7:24pm UTC](https://www.ruby-forum.com/t/how-to-open-pdf-or-doc-file-in-firefox/185744/4 "2010-03-25T19:24:56Z")

</div>

Colin is right. After googling it (  
[firefox view pdf in browser - Google Search](http://www.google.com/search?q=firefox+view+pdf+in+browser)) found the  
following page:  
[http://support.mozilla.com/en-US/kb/opening+PDF+files+within+Firefox](http://support.mozilla.com/en-US/kb/opening+PDF+files+within+Firefox) .

/Lasse

2010/3/25 Colin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [March 25, 2010, 4:43pm UTC](https://www.ruby-forum.com/t/how-to-open-pdf-or-doc-file-in-firefox/185744/5 "2010-03-25T16:43:15Z")

</div>

On 25 March 2010 15:32, Hemant B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hope you got me right…  
> And yes i got to know that there are so many ways with which you can  
> configure this on your machine only.

As far as I know this cannot be done. All you can do is to send the  
pdf file. It is up to the browser to decide what to do with it. I  
may be wrong though.

Colin
