# Send\_file - PDF

**URL:** <https://www.ruby-forum.com/t/send-file-pdf/128923>\
**Category:** Rails\
**Created:** [February 12, 2008, 6:46pm UTC](https://www.ruby-forum.com/t/send-file-pdf/128923 "2008-02-12T18:46:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pete](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3ab097/32.png) [@pete](https://www.ruby-forum.com/u/pete)\
**Post date:** [February 12, 2008, 6:46pm UTC](https://www.ruby-forum.com/t/send-file-pdf/128923/1 "2008-02-12T18:46:08Z")

</div>

Hi-

I’d like to load a PDF file into a page, in my controller:

send\_file “/path to/my.pdf”, :disposition =\> “inline”

However, instead of rendering inline, it asks to download the file.

How can I display the contents without downloading?

Thanks!

---

<div class="post-metadata">

**Author:** ![pete](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3ab097/32.png) [@pete](https://www.ruby-forum.com/u/pete)\
**Post date:** [February 12, 2008, 6:56pm UTC](https://www.ruby-forum.com/t/send-file-pdf/128923/2 "2008-02-12T18:56:44Z")

</div>

On 12 Feb 2008, at 18:45, pete wrote:

> I’d like to load a PDF file into a page, in my controller:
> 
> send\_file “/path to/my.pdf”, :disposition =\> “inline”
> 
> However, instead of rendering inline, it asks to download the file.
> 
> How can I display the contents without downloading?

As far as I know, this is a browser preference. In Safari, they will  
show in the browser, unless the user has disabled it using:

defaults write com.apple.Safari WebKitOmitPDFSupport -bool YES

On Windows, it largely depends on whether the Adobe Acrobat Reader is  
installed and configured to load it into the browser.

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![pete](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3ab097/32.png) [@pete](https://www.ruby-forum.com/u/pete)\
**Post date:** [February 12, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/send-file-pdf/128923/3 "2008-02-12T19:02:03Z")

</div>

Hmm, I’ll look at that.

Do I need to do anything in the view?

---

<div class="post-metadata">

**Author:** ![pete](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3ab097/32.png) [@pete](https://www.ruby-forum.com/u/pete)\
**Post date:** [February 12, 2008, 7:13pm UTC](https://www.ruby-forum.com/t/send-file-pdf/128923/4 "2008-02-12T19:13:54Z")

</div>

I don’t see any preferences in Mozilla in terms of how to render a PDF  
file. Could it be related to anything else?
