On 28 Jun 2010, at 19:28, Mamadou Touré wrote:

Peter De Berdt wrote:
On 28 Jun 2010, at 17:56, Mamadou Touré wrote:

I want to display a pdf on my browser bu using
send_data(File.read(FILE_PATH + FILE_NAME), :type =>
'application/pdf',:disposition => 'inline', :filename => FILE_NAME)

But nothing happens. Do you know why ?

Serving it via AJAX or a normal request? Files always need to be
served as a normal request. Otherwise you should make sure that the
PDF as well as the path is valid.

If it isn't one of these two, you'll have to dig in deeper yourself
and provide the list with more information.


Best regards

Peter De Berdt

The path is valid. If I look to my console log I see that it doesn't
fail. I got this :
Streaming file C:\Users\gen00696\Desktop\Formulaires Intelligents pour
Mamadou\testFIetData.xdp

But noyhing is displayed

It seems to be a common problem with xdp files, which are not PDF files btw and should not be served as application/pdf, but as application/vnd.adobe.xdp+xml But even then, the browser plugins can't seem to handle it anyway, as you can see at Adobe forums: http://forums.adobe.com/thread/332614


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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to