Ichikawa Amin wrote:> guys,
> hope, you well.
> In my rails page I want to embed a PDF in my page where there are other
> dynamic created informations.
>
> I use the following code:
> <% path="#{RAILS_ROOT}/manual/test.pdf" %>
> <EMBED src="<%= path %>" width="450"
height="450"></EMBED>
>
> But it can not open the pdf file.
> Why? please take a hand in my code.
> regards.
>
>
> Amin
>
I think for it to be publicly accessible, the file needs to be in the
directory public. Try copying it to
rails_app_root/public/manual/test.pdf and link to it. If you require it
to be in a non-public place, you will need to use SendFile to send the
file to the browser.
Hope this helps.
mohit.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---