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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs