doouzlrvb01417498 2016-09-15 07:40
浏览 2612

隐藏/禁用Chrome PDF Viewer上的下载按钮

I'm looking for a way to hide or disable the download button that appears in the Chrome PDF viewer. I have disabled the print button using the protection script of fpdf(http://www.fpdf.org/en/script/script37.php), but it doesn't help with the download button. The PDF is currently being opened in a new window via :

window.open(URL, "", "resizable=yes, scrollbars=yes, titlebar=yes, width=1024, height=900, top=10, left=10");

I realize this won't stop any somewhat informed user from saving/printing the PDF, but the client is insisting on this "security measure".

If I inspect the element using Dev Tools and add display: none it does what I want, but I'm not sure how to add that by default in the new window that opens.

</div>
  • 写回答

3条回答 默认 最新

  • dttnb997315 2016-09-15 07:46
    关注

    Since you are delivering pdf file directly into the browser, displayed using Adobe Reader ActiveX, how can it be possible to prevent file download, since the files are displayed after downloaded into your temp directory?

    So it is not possible using ANY JavaScript library.

    The only way to secure your master PDF files is by creating Images for each page and present those to the user on the web via your own interface (html, flash etc).

    You may use ImageMagick along with GhostScript for this.

    You may go through veryinteractivepeople

    Hope this helps. (:

    评论

报告相同问题?

悬赏问题

  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题