【发布时间】:2013-12-24 14:17:37
【问题描述】:
我正在使用 Google Document Viewer 来显示 pdf 文件。我已经给出了要显示的 pdf 文件的链接,它在 Firefox 浏览器中正确显示,并且 chrome 允许我下载该文件而不显示。
我不想在任何浏览器中下载它,只是查看文档。
是否可以隐藏包含缩放、下载和打印选项的查看器工具栏?
当我点击查看文档时,它将带我到 show.htm,其中 google doc 查看器将显示 pdf。
<%= link_to "View Document", course_path(:course_id => @course.id), :class =>"view_btn" %>
show.html.erb
<iframe src="http://docs.google.com/gview?url=http://localhost:3000/<%= @document.document.url(:original) %>&embedded=true" style=" height: 1039px; width: 1039px; margin-left: 5px;" frameborder="0"></iframe>
【问题讨论】:
-
我不想在任何浏览器中下载它,只是查看文档。 - 但是不知道如何查看的观众怎么办?他们通常仍然只提供下载。
-
Google 文档查看器用于查看运行良好的文件,我的意思是我不想让访问此页面的用户下载工具,知道吗?
标签: ruby-on-rails ruby pdf ruby-on-rails-3.2 google-document-viewer