1.如果使用的是window.parent.open打开的pdf则是在连接后面加#toolbar=0

2.采用的是PDFObject.embed预览pdf
修改源码viewer.html中Download 和 Print增加 样式 style="display:none;"
在这里插入图片描述
在这里插入图片描述

3.禁用右键菜单

<script>
    document.oncontextmenu = function(){
    return false;
}
</script>

在viewer.html的底部增加禁用
在这里插入图片描述
调用 PDFObject.embed 的页面 也要加入上面的禁用菜单代码

GitHub 加速计划 / pd / pdf.js
6
0
下载
PDF Reader in JavaScript
最近提交(Master分支:5 个月前 )
ac579396 Implement helper functions for (un)selecting an editor in the integration tests 2 天前
895edafc This has multiple advantages: - it improves consistency between the various editor integration tests; - it makes the code easier to read/understand; - it reduces code duplication. 3 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐