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! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hmm, I''ll look at that. Do I need to do anything in the view? On Feb 12, 5:55 pm, Peter De Berdt <peter.de.be...-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> wrote:> 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I don''t see any preferences in Mozilla in terms of how to render a PDF file. Could it be related to anything else? On Feb 12, 6:01 pm, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hmm, I''ll look at that. > > Do I need to do anything in the view? > > On Feb 12, 5:55 pm, Peter De Berdt <peter.de.be...-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> wrote: > > > 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---