如何删除通过iframe打开的PDF下载图标
我想删除PDF查看器中的下载图标,但我不能。我正在通过iframe打开PDF。这是我下面我的代码的一个示例:
<html>
<head>
<title>Disable Context Menu</title>
</head>
<body oncontextmenu="return false">
<iframe id="pdfFrame" width="500px" height="600px" src="png.pdf"></iframe>
</body>
</html>
首先,我试图在iframe打开的页面内应用样式,但我无法成功。
I want to remove that download icon that is in the PDF viewer, but I can't. I'm opening the pdf through an iframe. Here is an example of my code below:
<html>
<head>
<title>Disable Context Menu</title>
</head>
<body oncontextmenu="return false">
<iframe id="pdfFrame" width="500px" height="600px" src="png.pdf"></iframe>
</body>
</html>
First I tried to apply a style inside the page opened by the iframe, but I couldn't succeed in that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
更改:
in:
希望有所帮助!
Change:
In:
Hope that helped!
将PDF放置在分布式网络系统(WorldWideWeb)中时,您不能简单地更改PDF的视图,它与公共域中的每个项目都变得相同,嵌入式对象可下载和视图。
您可以就如何处理这些位置的方式提出建议(请参阅我如何通过片段提出的建议,第二帧可能是#工具栏= 0),但是一旦您发布了HTML对象,它们将不再是您的控制。
大多数浏览器都会带有自己的编辑器来删除它,就像您可以添加一样简单。
Google可以通过某些方法使提取源PDF副本更加困难,但是如果客户可以查看它,则已经将副本已经被赠予了(删除)。
You cannot simply change the view of a PDF when you placed it in the Distributed Network System (WorldWideWeb) it became just the same as EVERY item in the Public Domain an embedded object for download and view.
You can make suggestions as to how those dis-positions may be handled (see how I suggested via a fragment the second frame could be #toolbar=0) but once you publish html objects they are no longer yours to control.
Most browsers will come with their own editors to remove that just as easy as you can add it.
There are ways google can make it more difficult to extract the source PDF copy but if the client can view it a copy has already been gifted (dis-possessed) to them.