send_file - PDF


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 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

Hmm, I'll look at that.

Do I need to do anything in the view?

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