# Read the pdf

**URL:** <https://www.ruby-forum.com/t/read-the-pdf/143993>\
**Category:** Rails\
**Created:** [July 24, 2008, 2:11pm UTC](https://www.ruby-forum.com/t/read-the-pdf/143993 "2008-07-24T14:11:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sujith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/77aa72/32.png) [@sujith](https://www.ruby-forum.com/u/sujith)\
**Post date:** [July 24, 2008, 2:11pm UTC](https://www.ruby-forum.com/t/read-the-pdf/143993/1 "2008-07-24T14:11:05Z")

</div>

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? using ruby on rails

---

<div class="post-metadata">

**Author:** ![sujith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/77aa72/32.png) [@sujith](https://www.ruby-forum.com/u/sujith)\
**Post date:** [July 24, 2008, 4:20pm UTC](https://www.ruby-forum.com/t/read-the-pdf/143993/2 "2008-07-24T16:20:54Z")

</div>

On Thu, 24 Jul 2008, Sujith Gangaraju 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? using ruby on rails

Are you sending the correct MIME type in your response?

Assuming you are and you’re getting the same result, then Im assuming  
your  
browser doesn’t know what to do with PDF files (either it doesn’t have  
any  
PDF plugins or is configured incorrectly for PDF files).

–
