Please check
http://api.rubyonrails.org/classes/ActionController/Streaming.html#M000421
An example is
send_file 'filepath', :disposition => 'inline',:type =>
'application/pdf'
Sijo
--
Posted via http://www.ruby-forum.com/.
thank you it help me some way but what i really need is i would like to show the content in the flash player like this url shows http://www.scribd.com/doc/18244537/The-World-According-to-Twitter
Don't do this. Scribd's PDF viewer is an impressive piece of Flash, but
it's underpowered compared to real PDF viewers like the Adobe Reader
plugin. Also, iPhone and Palm users can display PDF files but not
Flash, and I think screen readers would have an easier time with PDF
files.
Just serve up the straight PDF file and don't worry about Flash.
>
> Thanks & regards
> Mahesh
>
> On Tue, Sep 15, 2009 at 1:56 PM, Sijo Kg
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
+1
Or, at least provide both options to visitors. As a Safari user I don't
even need a plugin to have a great PDF viewing experience (even
surpasses that of the Adobe Reader plugin IMHO). Being forced to view
PDF inside Flash would just serve to irritate me to the point of never
using a site again. Or at least not without a lot of grumbling and
cursing of the site developer.
It doesn't have to be in an iframe -- you can serve it just like an HTML
file. Rails doesn't come into the issue.
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
It's really simple, and it isn't Flash, just add into the view,
"<iframe
src="http://docs.google.com/gview?url=#{YOUR_PDF_URL}&embedded=true"
style="width:600px; height:500px;" frameborder="0"></iframe>"
Fernando